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 committed Feb 13, 2024
1 parent 6818189 commit b2266d4
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 (S.LangOpts.CPlusPlus && (!scope || scope->getName() != "cheerp")) {
S.Diag(Attr.getLoc(), diag::warn_cheerp_deprecated_attribute)
<< Attr.getAttrName();
}
Expand Down

0 comments on commit b2266d4

Please sign in to comment.