[cfe-commits] r46939 - /cfe/trunk/test/Sema/conditional-expr.c
Eli Friedman
eli.friedman at gmail.com
Sun Feb 10 15:14:17 PST 2008
Author: efriedma
Date: Sun Feb 10 17:14:16 2008
New Revision: 46939
URL: http://llvm.org/viewvc/llvm-project?rev=46939&view=rev
Log:
Add a couple of sema tests for qualifiers with conditionals containing
void*.
Modified:
cfe/trunk/test/Sema/conditional-expr.c
Modified: cfe/trunk/test/Sema/conditional-expr.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/conditional-expr.c?rev=46939&r1=46938&r2=46939&view=diff
==============================================================================
--- cfe/trunk/test/Sema/conditional-expr.c (original)
+++ cfe/trunk/test/Sema/conditional-expr.c Sun Feb 10 17:14:16 2008
@@ -18,5 +18,9 @@
dp = 0 ? (double *)0 : (void *)0;
vp = 0 ? (double *)0 : (void *)0;
ip = 0 ? (double *)0 : (void *)0; // expected-warning {{incompatible pointer types assigning 'double *', expected 'int *'}}
+
+ const int *cip;
+ vp = (0 ? vp : cip); // expected-warning {{discards qualifiers}}
+ vp = (0 ? cip : vp); // expected-warning {{discards qualifiers}}
}
More information about the cfe-commits
mailing list