[PATCH] D80944: Add begin source location for the attributed statement created from PragmaLoopHint decorated loop

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 9 06:33:19 PDT 2020


aaron.ballman accepted this revision.
aaron.ballman added a comment.

LGTM aside from a minor nit.



================
Comment at: clang/lib/Parse/ParseStmt.cpp:2189
+
+  assert(!Attrs.Range.getBegin().isValid());
+  Attrs.Range.setBegin(StartLoc);
----------------
You can use `isInvalid()` here rather than `!isValid()`. Also, I'd appreciate an assertion message like `&& "start of attribute range already set"` or something.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80944/new/

https://reviews.llvm.org/D80944





More information about the cfe-commits mailing list