================
@@ -2702,7 +2702,7 @@ Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS,
   bool MalformedTypeSpec = false;
   if (!TemplateInfo.Kind &&
       Tok.isOneOf(tok::identifier, tok::coloncolon, tok::kw___super)) {
-    if (TryAnnotateCXXScopeToken())
+    if (getLangOpts().CPlusPlus && TryAnnotateCXXScopeToken())
----------------
Fznamznon wrote:

The caller is named `ParseCXXClassMemberDeclaration` so, I'm not sure it can 
and should be called outside of C++. Perhaps we should assert instead of 
checking that is its C++.

https://github.com/llvm/llvm-project/pull/74926
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to