[PATCH] D51314: Parse compile commands lazily in InterpolatingCompilationDatabase

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 27 10:27:00 PDT 2018


jfb added inline comments.


================
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:124
+// A CompileCommand that can be applied to another file. Any instance of this
+// object is invalid after std::move() from it.
 struct TransferableCommand {
----------------
This comment about `move` isn't really saying anything. Also, it's valid but unspecified (in the case of STL things). I'd drop it.


================
Comment at: lib/Tooling/InterpolatingCompilationDatabase.cpp:128
+      : OriginalCmd(std::move(C)),
+        TraitsComputed(llvm::make_unique<std::once_flag>()) {}
 
----------------
The `once_flag` should just be a static, don't allocate it.


Repository:
  rC Clang

https://reviews.llvm.org/D51314





More information about the cfe-commits mailing list