[clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 7 08:55:29 PDT 2025
================
@@ -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();
----------------
YexuanXiao wrote:
C99 does not support the 'z' and 't' format specifiers. Based on previous review feedback suggesting that `isStdNamespace` should be avoided in C mode, I will make it return early while retaining the C++ check here.
https://github.com/llvm/llvm-project/pull/143653
More information about the cfe-commits
mailing list