rdar://problem/55685132
Details
Diff Detail
Event Timeline
clang/lib/CodeGen/CGDebugInfo.cpp | ||
---|---|---|
2488 | Is this legal? remapDIPath takes a StringRef to Path. Is the sret value going to be a temporary or are we modifying the contents of the string while reading from it in remapDIPath? |
clang/lib/CodeGen/CGDebugInfo.cpp | ||
---|---|---|
2488 | No, this returns a std::string so you're returning a StringRef to a stack-allocated temporary. The lambda should return a std::string too. |
clang/lib/CodeGen/CGDebugInfo.cpp | ||
---|---|---|
2487 | & -> &TheCU We should try to explicitly capture what we use, this will avoid potential bugs where we accidentally modify something we did not mean to capture later on when modifying the code. |
I had to revert this because it unexpectedly broke the "expr -- @import Module" test in LLDB.
I'll update this with either a fix in clang or a patch to lldb once I figured out what happened.
& -> &TheCU
We should try to explicitly capture what we use, this will avoid potential bugs where we accidentally modify something we did not mean to capture later on when modifying the code.