[PATCH] D64564: Loop pragma parsing. NFC.

Michael Kruse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 14 13:44:27 PDT 2019


Meinersbur accepted this revision.
Meinersbur added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/lib/Parse/ParsePragma.cpp:1010
+  StringRef Str = PragmaName.getIdentifierInfo()->getName();
+  std::string ClangLoopStr = (Twine("clang loop ") + Str).str();
+  std::string Result = llvm::StringSwitch<StringRef>(Str)
----------------
[nit] I am surprised it works without `llvm::` qualifier for `llvm::Twine`. Maybe add it for consistency?


================
Comment at: clang/lib/Parse/ParsePragma.cpp:1016
+                 .Default("");
+  return Result;
 }
----------------
[nit] One could just `return llvm::StringSwitch...` without a `Result` variable. I used it in the suggestion so I could comment on what happens when returning. Personally, there is nothing that I could care less about, so use what you prefer.


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

https://reviews.llvm.org/D64564





More information about the cfe-commits mailing list