[clang] [Clang] add fix-it hints for unknown attributes (PR #141305)
Oleksandr T. via cfe-commits
cfe-commits at lists.llvm.org
Wed May 28 13:06:39 PDT 2025
================
@@ -672,12 +672,13 @@ static Attr *ProcessStmtAttribute(Sema &S, Stmt *St, const ParsedAttr &A,
!(A.existsInTarget(S.Context.getTargetInfo()) ||
(S.Context.getLangOpts().SYCLIsDevice && Aux &&
A.existsInTarget(*Aux)))) {
- S.Diag(A.getLoc(), A.isRegularKeywordAttribute()
- ? (unsigned)diag::err_keyword_not_supported_on_target
- : A.isDeclspecAttribute()
- ? (unsigned)diag::warn_unhandled_ms_attribute_ignored
- : (unsigned)diag::warn_unknown_attribute_ignored)
- << A << A.getRange();
+ if (A.isRegularKeywordAttribute() || A.isDeclspecAttribute())
----------------
a-tarasyuk wrote:
@erichkeane Sure, I'll change
https://github.com/llvm/llvm-project/pull/141305
More information about the cfe-commits
mailing list