diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-02-16 19:09:40 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-02-16 19:09:40 +0000 |
commit | fe17d2550b84202b599a86e0f4f4f1f4729deb30 (patch) | |
tree | fa7afad5e8ea21a0329f74811ad2421169b54bee /clang/test/SemaCXX/destructor.cpp | |
parent | 300048631b2e497141fb2492f083aa398f3649fd (diff) | |
download | bcm5719-llvm-fe17d2550b84202b599a86e0f4f4f1f4729deb30.tar.gz bcm5719-llvm-fe17d2550b84202b599a86e0f4f4f1f4729deb30.zip |
Improve parsing and instantiation of destructor names, so that we can
now cope with the destruction of types named as dependent templates,
e.g.,
y->template Y<T>::~Y()
Nominally, we implement C++0x [basic.lookup.qual]p6. However, we don't
follow the letter of the standard here because that would fail to
parse
template<typename T, typename U>
X0<T, U>::~X0() { }
properly. The problem is captured in core issue 339, which gives some
(but not enough!) guidance. I expect to revisit this code when the
resolution of 339 is clear, and/or we start capturing better source
information for DeclarationNames.
Fixes PR6152.
llvm-svn: 96367
Diffstat (limited to 'clang/test/SemaCXX/destructor.cpp')
-rw-r--r-- | clang/test/SemaCXX/destructor.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp index 6837cd40157..a0c2c1e037e 100644 --- a/clang/test/SemaCXX/destructor.cpp +++ b/clang/test/SemaCXX/destructor.cpp @@ -40,9 +40,9 @@ struct F { ~F(); // expected-error {{destructor cannot be redeclared}} }; -~; // expected-error {{expected the class name after '~' to name a destructor}} +~; // expected-error {{expected a class name after '~' to name a destructor}} ~undef(); // expected-error {{expected the class name after '~' to name a destructor}} -~operator+(int, int); // expected-error {{expected the class name after '~' to name a destructor}} +~operator+(int, int); // expected-error {{expected a class name after '~' to name a destructor}} ~F(){} // expected-error {{destructor must be a non-static member function}} struct G { |