aboutsummaryrefslogtreecommitdiff
path: root/test/FixIt/fixit.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-03-27 19:41:34 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-03-27 19:41:34 +0000
commit4147d307086cf024a40a080e2bf379e9725f6f41 (patch)
treeb6e6e985b11a73542af43946ce817701f64083e0 /test/FixIt/fixit.cpp
parent9198e399121274481e7383669633bb955e06045c (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128387 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/FixIt/fixit.cpp')
-rw-r--r--test/FixIt/fixit.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/FixIt/fixit.cpp b/test/FixIt/fixit.cpp
index 41b187b071..ac749859ea 100644
--- a/test/FixIt/fixit.cpp
+++ b/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}}
+}
+
+