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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits