[PATCH] D35519: Add SEMA checking to attribute 'target'
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 08:28:11 PDT 2017
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
A few small nits, but otherwise LGTM
================
Comment at: lib/Sema/SemaDeclAttr.cpp:2999-3000
+bool Sema::checkTargetAttr(SourceLocation LiteralLoc, StringRef AttrStr) {
+ // Error message enums. Enum vs enum class since the scope is limited,
+ // and it otherwise simplifies the error messages.
+ enum FirstParam { unsupported, duplicate};
----------------
I don't think this comment is needed (the code is pretty obvious), so I'd just drop it entirely.
================
Comment at: lib/Sema/SemaDeclAttr.cpp:3001-3002
+ // and it otherwise simplifies the error messages.
+ enum FirstParam { unsupported, duplicate};
+ enum SecondParam { None, architecture };
for (auto Str : {"tune=", "fpmath="})
----------------
enumerator casing should be Unsupported, Duplicate, Architecture.
https://reviews.llvm.org/D35519
More information about the cfe-commits
mailing list