diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-07-15 18:47:04 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-07-15 18:47:04 +0000 |
commit | cb2b662283177317dd8cf9638f72cb859c6c1ac6 (patch) | |
tree | 6dc5d88cac4158d0ec187ea06e1344792d096fe2 /clang/test/Sema/expr-comma.c | |
parent | df09db62e223b093aed64233d8daf86dc435c59f (diff) | |
download | bcm5719-llvm-cb2b662283177317dd8cf9638f72cb859c6c1ac6.tar.gz bcm5719-llvm-cb2b662283177317dd8cf9638f72cb859c6c1ac6.zip |
Make the "unused result" warning a warning about run-time behavior, so
that we don't warn when there isn't going to be any computation anyway.
llvm-svn: 108442
Diffstat (limited to 'clang/test/Sema/expr-comma.c')
-rw-r--r-- | clang/test/Sema/expr-comma.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/Sema/expr-comma.c b/clang/test/Sema/expr-comma.c index b004fc1ba3e..d3e4020af63 100644 --- a/clang/test/Sema/expr-comma.c +++ b/clang/test/Sema/expr-comma.c @@ -11,7 +11,7 @@ int B[sizeof((a.c)) == 17 ? 1 : -1]; // comma does not promote array/function in c90 unless they are lvalues. -int W[sizeof(0, a.c) == sizeof(char*) ? 1 : -1]; // expected-warning {{expression result unused}} -int X[sizeof(0, (foo().c)) == 17 ? 1 : -1]; // expected-warning {{expression result unused}} -int Y[sizeof(0, (a,b).c) == 17 ? 1 : -1]; // expected-warning {{expression result unused}} // expected-warning {{expression result unused}} -int Z[sizeof(0, (a=b).c) == 17 ? 1 : -1]; // expected-warning {{expression result unused}} +int W[sizeof(0, a.c) == sizeof(char*) ? 1 : -1]; +int X[sizeof(0, (foo().c)) == 17 ? 1 : -1]; +int Y[sizeof(0, (a,b).c) == 17 ? 1 : -1]; +int Z[sizeof(0, (a=b).c) == 17 ? 1 : -1]; |