================
@@ -6861,13 +6861,16 @@ ProcessDeclAttribute(Sema &S, Scope *scope, Decl *D, 
const ParsedAttr &AL,
   // though they were unknown attributes.
   if (AL.getKind() == ParsedAttr::UnknownAttribute ||
       !AL.existsInTarget(S.Context.getTargetInfo())) {
-    S.Diag(AL.getLoc(),
-           AL.isRegularKeywordAttribute()
-               ? (unsigned)diag::err_keyword_not_supported_on_target
-           : AL.isDeclspecAttribute()
-               ? (unsigned)diag::warn_unhandled_ms_attribute_ignored
-               : (unsigned)diag::warn_unknown_attribute_ignored)
-        << AL << AL.getRange();
+    if (AL.isRegularKeywordAttribute() || AL.isDeclspecAttribute()) {
----------------
erichkeane wrote:

I think that is a nice idea!  I think we actually already HAVE a ParsedAttr 
streaming diagnostic FWIW, its for `Attr *` (though we should probably make it 
work with `AttributeCommonInfo` instead, which works with `ParsedAttr` and 
`Attr`).

You're right about that being a bigger change, so I'm totally OK with that 
being a followup or a bug report.



https://github.com/llvm/llvm-project/pull/138519
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to