llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-clang Author: Elliot (apache-hb) <details> <summary>Changes</summary> Fixes #<!-- -->86422 --- Full diff: https://github.com/llvm/llvm-project/pull/86426.diff 1 Files Affected: - (modified) clang/lib/Parse/ParseDeclCXX.cpp (+4-3) ``````````diff diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 63fe678cbb29e2..d05b3a455f7f63 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -5061,11 +5061,12 @@ void Parser::ParseMicrosoftAttributes(ParsedAttributes &Attrs) { IdentifierInfo *II = Tok.getIdentifierInfo(); SourceLocation NameLoc = Tok.getLocation(); ConsumeToken(); - ParsedAttr::Kind AttrKind = - ParsedAttr::getParsedKind(II, nullptr, ParsedAttr::AS_Microsoft); + // For HLSL we want to handle all attributes, but for MSVC compat, we // silently ignore unknown Microsoft attributes. - if (getLangOpts().HLSL || AttrKind != ParsedAttr::UnknownAttribute) { + AttributeCommonInfo Info{II, NameLoc, AttributeCommonInfo::Form::Microsoft()}; + const ParsedAttrInfo& AttrInfo = ParsedAttrInfo::get(Info); + if (getLangOpts().HLSL || AttrInfo.hasSpelling(AttributeCommonInfo::AS_Microsoft, II->getName())) { bool AttrParsed = false; if (Tok.is(tok::l_paren)) { CachedTokens OpenMPTokens; `````````` </details> https://github.com/llvm/llvm-project/pull/86426 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits