]> granicus.if.org Git - clang/commit
Reimplement Sema::MatchTemplateParametersToScopeSpecifier() based on
authorDouglas Gregor <dgregor@apple.com>
Tue, 10 May 2011 18:27:06 +0000 (18:27 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 10 May 2011 18:27:06 +0000 (18:27 +0000)
commitc840649ed5acccf68e1bc5a9d22f2ea017074586
tree75551f7968f8f7ecaa1254f517270a6466627824
parent969f9d47338fc36ebb6d24ad3a51e45eda07fd58
Reimplement Sema::MatchTemplateParametersToScopeSpecifier() based on
the semantic context referenced by the nested-name-specifier rather
than the syntactic form of the nested-name-specifier. The previous
incarnation was based on my complete misunderstanding of C++
[temp.expl.spec]. The latest C++0x working draft clarifies the
requirements here, and this rewrite is intended to follow that.

Along the way, improve source location information in the
diagnostics. For example, if we report that a specific type needs or
doesn't need a 'template<>' header, we dig out that type in the
nested-name-specifier and highlight its range.

Fixes: PR5907, PR9421, PR8277, PR8708, PR9482, PR9668, PR9877, and
<rdar://problem/9135379>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@131138 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Sema/Sema.h
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaTemplate.cpp
test/CXX/temp/temp.spec/temp.expl.spec/examples.cpp [new file with mode: 0644]
test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp