[PATCH] D70537: [clang] CGDebugInfo asserts `!DT.isNull()` when compiling with debug symbols
kamlesh kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 13 04:45:16 PST 2019
kamleshbhalui added a comment.
In D70537#1769458 <https://reviews.llvm.org/D70537#1769458>, @dblaikie wrote:
> I feel like there's something missing about this bug/issue - is there a good explanation/understanding for why does the bug only occur with the two levels of static member inline variable templates & not one? Perhaps there's some existing code that works for simple cases but is insufficiently general and should be modified to be so, rather than adding a new case?
Here is the situation which is occuring in the particuler case(referring added testcase pr42710.cpp),
while instantiating the template variable `value` it also needs the type to declare it
(see at https://github.com/llvm-mirror/clang/blob/master/lib/Sema/SemaTemplateInstantiateDecl.cpp#L4590)
and it sees that it is undeduced type , so it starts instantiating the
initialization expression and in order to doing so it comes to at this point
https://github.com/llvm-mirror/clang/blob/master/lib/CodeGen/CGDebugInfo.cpp#L1424
which iterates over all the VarDecl in record and try to generate debug info.
again here template variable `value` comes , which was undeduced and fails to unwrap the type and finally assert fails.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70537/new/
https://reviews.llvm.org/D70537
More information about the cfe-commits
mailing list