summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-10-13 16:30:37 +0000
committerDouglas Gregor <dgregor@apple.com>2009-10-13 16:30:37 +0000
commitcf91555cb8d77fe2a6b2f5b5a7da7ceb4c2d8153 (patch)
treef6ff343c42e5f5fe485e52bdd5cf973fde08cb43 /clang/lib/CodeGen/CodeGenModule.cpp
parent0bc673de0d94ec36eb50bbfe4c00b8d6d8727708 (diff)
downloadbcm5719-llvm-cf91555cb8d77fe2a6b2f5b5a7da7ceb4c2d8153.tar.gz
bcm5719-llvm-cf91555cb8d77fe2a6b2f5b5a7da7ceb4c2d8153.zip
When explicitly specializing a member that is a template, mark the
template as a specialization. For example, this occurs with: template<typename T> struct X { template<typename U> struct Inner { /* ... */ }; }; template<> template<typename T> struct X<int>::Inner { T member; }; We need to treat templates that are member specializations as special in two contexts: - When looking for a definition of a member template, we look through the instantiation chain until we hit the primary template *or a member specialization*. This allows us to distinguish between the primary "Inner" definition and the X<int>::Inner definition, above. - When computing all of the levels of template arguments needed to instantiate a member template, don't add template arguments from contexts outside of the instantiation of a member specialization, since the user has already manually substituted those arguments. Fix up the existing test for p18, which was actually wrong (but we didn't diagnose it because of our poor handling of member specializations of templates), and add a new test for member specializations of templates. llvm-svn: 83974
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud