[libcxx-commits] [clang] [clang-tools-extra] [libcxx] [lldb] [Clang] Make the SizeType, SignedSizeType and PtrdiffType be named sugar types instead of built-in types (PR #143653)
Erich Keane via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 7 07:17:59 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();
----------------
erichkeane wrote:
What about pre-C99? Does ObjC not have these? If we're not going to do these, we should do an early exit (`if )!C99 && !CPlusPlus) return false;`) at the top of the TU and remove these two branches, and just use the `RC` assignment from 333.
https://github.com/llvm/llvm-project/pull/143653
More information about the libcxx-commits
mailing list