[cfe-commits] r77780 - in /cfe/trunk/test: Parser/statements.c Sema/enum.c SemaCXX/decl-expr-ambiguity.cpp
Daniel Dunbar
daniel at zuster.org
Fri Jul 31 23:07:15 PDT 2009
Author: ddunbar
Date: Sat Aug 1 01:07:15 2009
New Revision: 77780
URL: http://llvm.org/viewvc/llvm-project?rev=77780&view=rev
Log:
Ok, ok, I give in. Fix tests for unused result warning.
Modified:
cfe/trunk/test/Parser/statements.c
cfe/trunk/test/Sema/enum.c
cfe/trunk/test/SemaCXX/decl-expr-ambiguity.cpp
Modified: cfe/trunk/test/Parser/statements.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/statements.c?rev=77780&r1=77779&r2=77780&view=diff
==============================================================================
--- cfe/trunk/test/Parser/statements.c (original)
+++ cfe/trunk/test/Parser/statements.c Sat Aug 1 01:07:15 2009
@@ -11,11 +11,11 @@
while (0) while(0) do ; while(0);
- for (0;0;0)
+ for ((void)0;0;(void)0)
for (;;)
- for (9;0;2)
+ for ((void)9;0;(void)2)
;
- for (int X = 0; 0; 0);
+ for (int X = 0; 0; (void)0);
}
void test3() {
Modified: cfe/trunk/test/Sema/enum.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/enum.c?rev=77780&r1=77779&r2=77780&view=diff
==============================================================================
--- cfe/trunk/test/Sema/enum.c (original)
+++ cfe/trunk/test/Sema/enum.c Sat Aug 1 01:07:15 2009
@@ -43,7 +43,7 @@
;
(_Bool)ve2; // expected-error {{arithmetic or pointer type is required}}
- for (; ;ve2)
+ for (; ;ve2) // expected-warning {{expression result unused}}
;
(void)ve2;
ve2; // expected-warning {{expression result unused}}
Modified: cfe/trunk/test/SemaCXX/decl-expr-ambiguity.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/decl-expr-ambiguity.cpp?rev=77780&r1=77779&r2=77780&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/decl-expr-ambiguity.cpp (original)
+++ cfe/trunk/test/SemaCXX/decl-expr-ambiguity.cpp Sat Aug 1 01:07:15 2009
@@ -12,7 +12,7 @@
__typeof(int)(a,5)<<a; // expected-error {{function-style cast to a builtin type can only take one argument}}
void(a), ++a; // expected-warning {{expression result unused}}
if (int(a)+1) {}
- for (int(a)+1;;) {}
+ for (int(a)+1;;) {} // expected-warning {{expression result unused}}
a = sizeof(int()+1);
a = sizeof(int(1));
typeof(int()+1) a2; // expected-error {{extension used}}
More information about the cfe-commits
mailing list