llvm-project/clang/unittests/ASTMatchers
Nico Weber 26911c7733 Make ParentMap work with explicit specializations of function templates.
For an explicit specialization, we first build a FunctionDecl, and then
we call SubstDecl() on it to build a second FunctionDecl, which has the
first FunctionDecl as canonical decl.

The address of an explicit specialization of function template used to be the
canonical decl of the FunctionDecl.  This is different from all the other
DeduceTemplateArguments() calls in SemaOverload, and since the canonical decl
isn't visited by ParentMap while the redecl is, it also made ParentMap assert
when computing the parent of a address-of-explicit-specialization-fun-template.

To fix, remove the getCanonicalDecl() call.  No behavior difference for clang,
but it fixes an assert in ParentMap (which is e.g. used by libTooling).

llvm-svn: 260159
2016-02-08 22:23:09 +00:00
..
Dynamic Reapply r259210 with a fix for RegistryTest.cpp. 2016-02-01 14:11:47 +00:00
ASTMatchersTest.cpp Make ParentMap work with explicit specializations of function templates. 2016-02-08 22:23:09 +00:00
ASTMatchersTest.h Add an optional ToolName argument to runToolOnCodeWithArgs/buildASTFromCodeWithArgs. 2016-01-29 11:29:02 +00:00
CMakeLists.txt [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each CMakeLists.txt. 2013-12-10 12:40:37 +00:00