================ @@ -320,6 +320,92 @@ bool clang::analyze_format_string::ParseUTF8InvalidSpecifier( // Methods on ArgType. //===----------------------------------------------------------------------===// +static bool namedTypeToLengthModifierKind(ASTContext &Ctx, QualType QT, + LengthModifier::Kind &K) { + for (/**/; const auto *TT = QT->getAs<TypedefType>(); + QT = TT->getDecl()->getUnderlyingType()) { + const auto *TD = TT->getDecl(); + const auto *DC = TT->getDecl()->getDeclContext(); + bool RC = false; + if (Ctx.getLangOpts().C99) { + RC = DC->isTranslationUnit(); ---------------- erichkeane wrote:
AH! That is different, that is `getStdNamespace`, since mentioning it can cause the namespace to be created (which is a nonsensical thing to do). Asking `isStdNamespace` is not problematic. https://github.com/llvm/llvm-project/pull/143653 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits