[PATCH] D11279: Initial patch for PS4 toolchain

Jonathan Roelofs via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 3 08:39:39 PDT 2015


jroelofs added inline comments.

================
Comment at: lib/Frontend/InitHeaderSearch.cpp:340
@@ +339,3 @@
+        BaseSDKPath = P.str();
+      }
+    }
----------------
kromanova wrote:
> jroelofs wrote:
> > The lifetime of `P` ends here, yet a reference to it lives on because of the `= P.str()`. Using it later on line 344 is UB.
> Good catch. Thank you! We will fix it.
Oops, nevermind... I was wrong: BaseSDKPath is a std::string, not a `char*` so there's no lifetime issue here.


http://reviews.llvm.org/D11279





More information about the cfe-commits mailing list