[PATCH] Refactor the code in clang to find a file in a PATH like environment variable into a helper function
Hans Wennborg
hans at chromium.org
Thu Jun 19 12:42:00 PDT 2014
lgtm
================
Comment at: lib/Support/Process.cpp:74
@@ +73,3 @@
+ const std::string& FileName)
+{
+ Optional<std::string> FoundPath;
----------------
Nit: The curly should go on the previous line.
================
Comment at: lib/Support/Process.cpp:77
@@ +76,3 @@
+ Optional<std::string> OptPath = Process::GetEnv(EnvName);
+ if (!OptPath.hasValue())
+ return FoundPath;
----------------
I guess we can drop hasValue() here since Optional has its bool operator.
http://reviews.llvm.org/D4201
More information about the llvm-commits
mailing list