Skip to content

Commit

Permalink
sema: don't emit warning for unprefixed attribute in C
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyxogen authored and yuri91 committed Feb 13, 2024
1 parent 6818189 commit a7897fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Sema/SemaDeclAttr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8550,7 +8550,7 @@ static bool MustDelayAttributeArguments(const ParsedAttr &AL) {
static void checkCheerpUnprefixedDeprecations(Sema &S,
const ParsedAttr &Attr) {
const IdentifierInfo *scope = Attr.getScopeName();
if (!scope || scope->getName() != "cheerp") {
if (Attr.isCXX11Attribute() && (!scope || scope->getName() != "cheerp")) {
S.Diag(Attr.getLoc(), diag::warn_cheerp_deprecated_attribute)
<< Attr.getAttrName();
}
Expand Down

0 comments on commit a7897fe

Please sign in to comment.