diff options
| author | Douglas Gregor <dgregor@apple.com> | 2010-06-16 22:31:08 +0000 |
|---|---|---|
| committer | Douglas Gregor <dgregor@apple.com> | 2010-06-16 22:31:08 +0000 |
| commit | f7d77718123f89862cd761cf3bac4d5e80808e40 (patch) | |
| tree | 1b58c3848efa8058bcbcdea774678aa475886535 /clang/test/SemaObjCXX/message.mm | |
| parent | d50c96a002f39ec9dba678acb391f7658201fd4c (diff) | |
| download | bcm5719-llvm-f7d77718123f89862cd761cf3bac4d5e80808e40.tar.gz bcm5719-llvm-f7d77718123f89862cd761cf3bac4d5e80808e40.zip | |
Fix the recently-added warning about 'typename' and 'template'
disambiguation keywords outside of templates in C++98/03. Previously,
the warning would fire when the associated nested-name-specifier was
not dependent, but that was a misreading of the C++98/03 standard:
now, we complain only when we're outside of any template.
llvm-svn: 106161
Diffstat (limited to 'clang/test/SemaObjCXX/message.mm')
| -rw-r--r-- | clang/test/SemaObjCXX/message.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/test/SemaObjCXX/message.mm b/clang/test/SemaObjCXX/message.mm index 10b886b203f..76bde6f57ca 100644 --- a/clang/test/SemaObjCXX/message.mm +++ b/clang/test/SemaObjCXX/message.mm @@ -62,15 +62,15 @@ struct identity { // or typename-specifiers. if (false) { if (true) - return [typename identity<I3>::type method]; // expected-warning{{'typename' refers to a non-dependent type name; accepted as a C++0x extension}} + return [typename identity<I3>::type method]; // expected-warning{{occurs outside of a template}} return [::I3 method]; } int* ip1 = {[super method]}; int* ip2 = {[::I3 method]}; - int* ip3 = {[typename identity<I3>::type method]}; // expected-warning{{'typename' refers to a non-dependent type name; accepted as a C++0x extension}} - int* ip4 = {[typename identity<I2_holder>::type().get() method]}; // expected-warning{{'typename' refers to a non-dependent type name; accepted as a C++0x extension}} + int* ip3 = {[typename identity<I3>::type method]}; // expected-warning{{occurs outside of a template}} + int* ip4 = {[typename identity<I2_holder>::type().get() method]}; // expected-warning{{occurs outside of a template}} int array[5] = {[3] = 2}; return [super method]; } |

