[PATCH] D101484: Improve error messages for attributes in the wrong context.
Duncan P. N. Exon Smith via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 28 13:36:07 PDT 2021
dexonsmith accepted this revision.
dexonsmith added a comment.
This revision is now accepted and ready to land.
Seems like a nice improvement. LGTM, with one style nit inline.
================
Comment at: llvm/lib/IR/Attributes.cpp:1699
for (unsigned i = index_begin(), e = index_end(); i != e; ++i) {
- if (getAttributes(i).hasAttributes())
- O << " { " << i << " => " << getAsString(i) << " }\n";
+ if (getAttributes(i).hasAttributes()) {
+ O << " { ";
----------------
I suggest reducing nesting with an early `continue` here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101484/new/
https://reviews.llvm.org/D101484
More information about the llvm-commits
mailing list