[PATCH] D35519: Add SEMA checking to attribute 'target'

Eric Christopher via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 18 08:48:00 PDT 2017

echristo added a comment.

If you wouldn't mind I'd like to see this separated out a bit -
a) I think we can make the attribute info a struct rather than a pair as a simple change first
b) setCPU split
c) let's see where we are after that?

Also the description makes it sound like you're adding support for the feature rather than fixing the terrible error diagnostics - or at least to my early morning brain. :)

Also, one inline comment so far.



Comment at: test/Sema/attr-target.c:10
+int __attribute__((target("arch="))) turtle() { return 4; } // no warning, same as saying 'nothing'.
+int __attribute__((target("arch=hiss,arch=woof"))) pine_tree() { return 4; } //expected-warning {{ignoring duplicate 'arch=' in the target attribute string}}
Precedence issue maybe, but I'd have expected this to error on the architecture name rather than the duplicate?


More information about the cfe-commits mailing list