diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-05-10 18:27:06 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-05-10 18:27:06 +0000 |
commit | 972fe534ed33dbb10a26b527f69f19c677722277 (patch) | |
tree | 3c3f607415fa0570cb33e60653c29a5cb9d7c501 /clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp | |
parent | 62f1ab79ecc350021f0a986d3e2a03b172b24f80 (diff) | |
download | bcm5719-llvm-972fe534ed33dbb10a26b527f69f19c677722277.tar.gz bcm5719-llvm-972fe534ed33dbb10a26b527f69f19c677722277.zip |
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>.
llvm-svn: 131138
Diffstat (limited to 'clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp')
-rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp index 88cfc5d7c39..56231e2f725 100644 --- a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp +++ b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp @@ -24,12 +24,11 @@ namespace test1 { template <> class A<double> { public: - static int foo; // expected-note{{attempt to specialize}} + static int foo; static int bar; }; typedef A<double> AB; - template <> int AB::foo = 0; // expected-error{{extraneous 'template<>'}} \ - // expected-error{{does not specialize}} + template <> int AB::foo = 0; // expected-error{{extraneous 'template<>'}} int AB::bar = 1; } |