summaryrefslogtreecommitdiff
path: root/test/SemaCXX/condition.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-28 03:01:12 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-06-28 03:01:12 +0000
commitdb7abf78dedc2ef6ccb42b3dac6ab330fe2ea469 (patch)
tree838b82559d934593c3160e09d4d9f7019800092a /test/SemaCXX/condition.cpp
parent2ba68b29645a1d0acb86348b61f137e0ade8864b (diff)
downloadclang-db7abf78dedc2ef6ccb42b3dac6ab330fe2ea469.tar.gz
Remove the call to GetTypeForDeclarator in Sema::ActOnCXXConditionDeclaration.
No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133984 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/condition.cpp')
-rw-r--r--test/SemaCXX/condition.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/SemaCXX/condition.cpp b/test/SemaCXX/condition.cpp
index cb7391a5f1..3441bae670 100644
--- a/test/SemaCXX/condition.cpp
+++ b/test/SemaCXX/condition.cpp
@@ -16,6 +16,7 @@ void test() {
for (;s;) ; // expected-error {{value of type 'struct S' is not contextually convertible to 'bool'}}
switch (s) {} // expected-error {{statement requires expression of integer type ('struct S' invalid)}}
+ while (struct NewS *x=0) ;
while (struct S {} *x=0) ; // expected-error {{types may not be defined in conditions}}
while (struct {} *x=0) ; // expected-error {{types may not be defined in conditions}}
switch (enum {E} x=0) ; // expected-error {{types may not be defined in conditions}} expected-error {{cannot initialize}} \