[PATCH] D122385: [clang][deps] Fix clang-cl output argument parsing

Sylvain Audi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 9 07:46:02 PST 2022


saudi added inline comments.
Herald added a subscriber: ributzka.


================
Comment at: clang/tools/clang-scan-deps/ClangScanDeps.cpp:487
+                if (!llvm::sys::path::has_extension(CurrentO))
+                  LastO = (CurrentO + ".obj").str();
+                else
----------------
Before the patch `LastO` string allocation was done only once (because of the `!LastO.empty()` test).
It probably would be better to have it of type `StringRef` and allocate once at the end


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122385



More information about the cfe-commits mailing list