aaron.ballman added inline comments.

================
Comment at: test/Sema/attr-target.c:9-10
 int __attribute__((target("fpmath=387"))) walrus() { return 4; } 
//expected-warning {{ignoring unsupported 'fpmath=' in the target attribute 
string}}
+// expected-warning@+1 {{'target' attribute ignored}}
 int __attribute__((target("avx,sse4.2,arch=hiss"))) meow() {  return 4; 
}//expected-warning {{ignoring unsupported architecture 'hiss' in the target 
attribute string}}
+// expected-warning@+1 {{'target' attribute ignored}}
----------------
erichkeane wrote:
> aaron.ballman wrote:
> > Is there ever a case where you *won't* get the "ignoring unsupported" 
> > without also getting the "'target' attribute ignored" warning as well? It 
> > seems a bit chatty to give two diagnostics for each mistake, and it makes 
> > one of those diagnostics seem incorrect -- in this case, one diagnostic 
> > says "ignoring unsupported architecture 'hiss'", implying the others are 
> > not ignored, but then the second diagnostic says the whole attribute is 
> > ignored.
> There is not... I actually put in the second because I thought that the 1st 
> (ignoring unsupported...) was pretty ambiguous.  I'll rev this patch seeing 
> if I can simply make the former more clear.
I think that makes sense. Or, alternatively, make the first diagnostic accurate 
by dropping all unsupported targets (leaving the valid ones) and adjusting the 
diagnostic wording depending on whether the whole attribute is dropped, or just 
parts of it?


https://reviews.llvm.org/D43359



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to