diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-03-27 19:41:34 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-03-27 19:41:34 +0000 |
commit | 4e7a2c09b22bb04819702ac6b8ea8b59ca396fa5 (patch) | |
tree | 8d80d1f74cc1776970e0bf38be575ef0c58dd60c /clang/test/FixIt/fixit.cpp | |
parent | 5f3601d35adb604c11c88ac62d239134b214d9bf (diff) | |
download | bcm5719-llvm-4e7a2c09b22bb04819702ac6b8ea8b59ca396fa5.tar.gz bcm5719-llvm-4e7a2c09b22bb04819702ac6b8ea8b59ca396fa5.zip |
Improve recovery (error + fix-it) when parsing type dependent template name without the "template" keyword.
For example:
typename C1<T>:: /*template*/ Iterator<0> pos;
Also the error is downgraded to an ExtWarn in Microsoft mode.
llvm-svn: 128387
Diffstat (limited to 'clang/test/FixIt/fixit.cpp')
-rw-r--r-- | clang/test/FixIt/fixit.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/test/FixIt/fixit.cpp b/clang/test/FixIt/fixit.cpp index 41b187b0718..ac749859ea0 100644 --- a/clang/test/FixIt/fixit.cpp +++ b/clang/test/FixIt/fixit.cpp @@ -78,3 +78,22 @@ void f() { } } +template <class A> +class F1 { +public: + template <int B> + class Iterator { + }; +}; + +template<class T> +class F2 { + typename F1<T>:: /*template*/ Iterator<0> Mypos; // expected-error {{use 'template' keyword to treat 'Iterator' as a dependent template name}} +}; + +template <class T> +void f(){ + typename F1<T>:: /*template*/ Iterator<0> Mypos; // expected-error {{use 'template' keyword to treat 'Iterator' as a dependent template name}} +} + + |