Author: akirtzidis
Date: Wed Sep 10 18:34:50 2008
New Revision: 56077

URL: http://llvm.org/viewvc/llvm-project?rev=56077&view=rev
Log:
In the 'condition.cpp' test case, make sure that condition declarations are 
local to the statement.

Modified:
    cfe/trunk/test/SemaCXX/condition.cpp

Modified: cfe/trunk/test/SemaCXX/condition.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/condition.cpp?rev=56077&r1=56076&r2=56077&view=diff

==============================================================================
--- cfe/trunk/test/SemaCXX/condition.cpp (original)
+++ cfe/trunk/test/SemaCXX/condition.cpp Wed Sep 10 18:34:50 2008
@@ -1,8 +1,8 @@
 // RUN: clang -fsyntax-only -verify %s 
 
 void test() {
-  int a;
-  if (a) ++a;
+  int x;
+  if (x) ++x;
   if (int x=0) ++x;
 
   typedef int arr[10];
@@ -10,7 +10,7 @@
   while (int f()=0) ; // expected-error: {{a function type is not allowed 
here}}
 
   struct S {} s;
-  if (s) ++a; // expected-error: {{expression must have bool type (or be 
convertible to bool) ('struct S' invalid)}}
+  if (s) ++x; // expected-error: {{expression must have bool type (or be 
convertible to bool) ('struct S' invalid)}}
   while (struct S x=s) ; // expected-error: {{expression must have bool type 
(or be convertible to bool) ('struct S' invalid)}}
   switch (s) {} // expected-error: {{statement requires expression of integer 
type ('struct S' invalid)}}
 


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to