[clang] Reland #90786 ([BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C) (PR #93121)

Dan Liew via cfe-commits cfe-commits at lists.llvm.org
Wed May 22 18:21:03 PDT 2024


================
@@ -744,7 +744,13 @@ void Parser::ParseLexedAttributeList(LateParsedAttrList &LAs, Decl *D,
   for (unsigned i = 0, ni = LAs.size(); i < ni; ++i) {
     if (D)
       LAs[i]->addDecl(D);
-    ParseLexedAttribute(*LAs[i], EnterScope, OnDefinition);
+    // FIXME: There has to be a better way to ask "is this C?""
+    if (LangStandard::getLangStandardForKind(getLangOpts().LangStd)
----------------
delcypher wrote:

@AaronBallman @erichkeane Is there a better way to check that we're building for C?

https://github.com/llvm/llvm-project/pull/93121


More information about the cfe-commits mailing list