[cfe-commits] r161776 - /cfe/trunk/docs/LibTooling.html
Marshall Clow
mclow at qualcomm.com
Mon Aug 13 11:56:38 PDT 2012
Author: marshall
Date: Mon Aug 13 13:56:38 2012
New Revision: 161776
URL: http://llvm.org/viewvc/llvm-project?rev=161776&view=rev
Log:
Minor rework of code example for clarity. No functionality change
Modified:
cfe/trunk/docs/LibTooling.html
Modified: cfe/trunk/docs/LibTooling.html
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/LibTooling.html?rev=161776&r1=161775&r2=161776&view=diff
==============================================================================
--- cfe/trunk/docs/LibTooling.html (original)
+++ cfe/trunk/docs/LibTooling.html Mon Aug 13 13:56:38 2012
@@ -141,13 +141,11 @@
cl::ParseCommandLineOptions(argc, argv);
if (!Compilations) {
std::string ErrorMessage;
- if (!BuildPath.empty()) {
- Compilations.reset(
- CompilationDatabase::autoDetectFromDirectory(BuildPath, ErrorMessage));
- } else {
- Compilations.reset(CompilationDatabase::autoDetectFromSource(
- SourcePaths[0], ErrorMessage));
- }
+ Compilations.reset(
+ !BuildPath.empty() ?
+ CompilationDatabase::autoDetectFromDirectory(BuildPath, ErrorMessage) :
+ CompilationDatabase::autoDetectFromSource(SourcePaths[0], ErrorMessage)
+ );
if (!Compilations)
llvm::report_fatal_error(ErrorMessage);
}
More information about the cfe-commits
mailing list