I cloned the llvm-project and compiled the clang by:
-DLLVM_ENABLE_PROJECTS=clang -G "Unix Makefiles" ../llvm
Then using gdb or lldb to debug clang, setting the breakpoint and runing:
lldb bin/clang++
(lldb) b DiagnoseUninstantiableTemplate
Breakpoint 1: where = clang++`clang::Sema::DiagnoseUninstantiableTemplate(clang::SourceLocation, clang::NamedDecl*, bool, clang::NamedDecl const*, clang::NamedDecl const*, clang::TemplateSpecializationKind, bool) + 59 at SemaTemplate.cpp:790:3, address = 0x00000000075869eb
(lldb) r test.cpp
but it doesn’t break on breakpoint, test.cpp
code as below:
template<typename ...>
struct dump;
int main() {
dump<int> x;
}
Why it does’n break on? I tried break on driver.cpp:main it will success.