[PATCH] D67632: [libTooling] Introduce new library of source-code builders.

Yitzhak Mandelbaum via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 17 05:42:05 PDT 2019


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


================
Comment at: clang/lib/Tooling/Refactoring/SourceCodeBuilders.cpp:77
+
+  if (Text.empty()) return std::string();
+  // Add leading '*'.
----------------
Eugene.Zelenko wrote:
> Could return {}. Same in other places. By the word, did you run Clang-format over code?
No, thanks for pointing that out.

I find `return std::string()` more readable, because it doesn't require that I check/know the return type of the function. But, if `return {}` is standard, I'm fine changing it. What's most common in the clang source?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67632





More information about the cfe-commits mailing list