[clang] fix issue 73559. (PR #74926)
Mariya Podchishchaeva via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 11 01:51:30 PST 2023
================
@@ -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
More information about the cfe-commits
mailing list