]> granicus.if.org Git - clang/commit
[modules] Properly look up the owning module for an instantiation of a merged template.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 21 Apr 2017 01:15:13 +0000 (01:15 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Fri, 21 Apr 2017 01:15:13 +0000 (01:15 +0000)
commit12b885c4eef333208b1af6497841354db36ca3d1
treecbe023b43624c14092ecdaa96f7d9589e5ba0ab1
parent6ae3e4a2fbb0549490604480013eb7e020074622
[modules] Properly look up the owning module for an instantiation of a merged template.

When looking for the template instantiation pattern of a templated entity,
consistently select the definition of the pattern if there is one. This means
we'll pick the same owning module when we start instantiating a template that
we'll later pick when determining which modules are visible during that
instantiation.

This reinstates r300650, reverted in r300659, with a fix for a regression
reported by Chandler after commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@300938 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Decl.cpp
lib/AST/DeclCXX.cpp
lib/Sema/SemaLookup.cpp
test/Modules/Inputs/template-default-args/a.h
test/Modules/Inputs/template-default-args/d.h
test/Modules/template-default-args.cpp