diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2008-02-10 23:14:16 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2008-02-10 23:14:16 +0000 |
commit | f76f5ed0505bc4b9c3c7d6003335b34cdf9afe47 (patch) | |
tree | e38c9c61259bd16f3d953d013e3a1887a7513e37 | |
parent | 99d724f6a31b5521ded95adf10ef7f3c62a0b18e (diff) |
Add a couple of sema tests for qualifiers with conditionals containing
void*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46939 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Sema/conditional-expr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/conditional-expr.c b/test/Sema/conditional-expr.c index a113adeeb3..0c9052845c 100644 --- a/test/Sema/conditional-expr.c +++ b/test/Sema/conditional-expr.c @@ -18,5 +18,9 @@ void foo() { 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}} } |