[PATCH] D136784: [Clang] Improve diagnostic message for loop hint pragma

Yueh-Ting (eop) Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 27 01:07:08 PDT 2022


eopXD marked an inline comment as done.
eopXD added inline comments.


================
Comment at: clang/lib/Parse/ParsePragma.cpp:1306
   StringRef Str = PragmaName.getIdentifierInfo()->getName();
+  if (Str == "loop")
+    return (llvm::Twine("clang loop ") + Option.getIdentifierInfo()->getName()).str();
----------------
SjoerdMeijer wrote:
> We've got some duplication now, as "loop" is also checked in line 1310. Can you see if you can merge these checks, simplify things here a bit?
Yes, the case for `loop` in below can now be removed. Thank you.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136784



More information about the cfe-commits mailing list