diff options
| author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-29 09:09:06 +0000 |
|---|---|---|
| committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-29 09:09:06 +0000 |
| commit | 53711607a080d75a6a2276bba9322243b445789d (patch) | |
| tree | 203a7fbe9e890a5ac229f34d410023d4c48d7a48 /clang/test/FixIt | |
| parent | 004685bdf7bd8b9e58b7d7864a87696ccc9ca5ac (diff) | |
| download | bcm5719-llvm-53711607a080d75a6a2276bba9322243b445789d.tar.gz bcm5719-llvm-53711607a080d75a6a2276bba9322243b445789d.zip | |
Add fix-it to remove 'typedef' from function template definitions. Such a token
was probably meant to be 'typename', which we will have already suggested if it
is appropriate.
llvm-svn: 145395
Diffstat (limited to 'clang/test/FixIt')
| -rw-r--r-- | clang/test/FixIt/fixit.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/test/FixIt/fixit.cpp b/clang/test/FixIt/fixit.cpp index 7c8ba9ac6f1..e0fa6088c37 100644 --- a/clang/test/FixIt/fixit.cpp +++ b/clang/test/FixIt/fixit.cpp @@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -pedantic -Wall -verify -fcxx-exceptions -x c++ %s +// RUN: %clang_cc1 -pedantic -Wall -Wno-comment -verify -fcxx-exceptions -x c++ %s // RUN: cp %s %t -// RUN: not %clang_cc1 -pedantic -Wall -fcxx-exceptions -fixit -x c++ %t -// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -fcxx-exceptions -x c++ %t +// RUN: not %clang_cc1 -pedantic -Wall -Wno-comment -fcxx-exceptions -fixit -x c++ %t +// RUN: %clang_cc1 -fsyntax-only -pedantic -Wall -Werror -Wno-comment -fcxx-exceptions -x c++ %t /* This is a test of the various code modification hints that are provided as part of warning or extension diagnostics. All of the @@ -135,3 +135,10 @@ int extraSemi2(); // expected-error {{stray ';' in function definition}} try { } catch (...) { } + +template<class T> struct Mystery; +template<class T> typedef Mystery<T>::type getMysteriousThing() { // \ + expected-error {{function definition declared 'typedef'}} \ + expected-error {{missing 'typename' prior to dependent}} + return Mystery<T>::get(); +} |

