]> granicus.if.org Git - clang/commit
Fix rdar://8139785 "implement warning on dead expression in comma operator"
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 30 Jun 2010 10:53:14 +0000 (10:53 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 30 Jun 2010 10:53:14 +0000 (10:53 +0000)
commit25973455aed1cdc9c40b208c792b5db4f8f1297d
tree7fc5f12a8716c208d2fdb8663464665c8c2421f8
parent8f4eae96bef0902d93535c18b69154ce66f5e546
Fix rdar://8139785 "implement warning on dead expression in comma operator"

As a bonus, fix the warning for || and && operators; it was emitted even if one of the operands had side effects, e.g:

x || test_logical_foo1();

emitted a bogus "expression result unused" for 'x'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107274 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Expr.cpp
lib/Sema/SemaExpr.cpp
test/Analysis/dead-stores.c
test/Parser/objc-try-catch-1.m
test/Sema/const-eval.c
test/Sema/expr-comma-c89.c
test/Sema/expr-comma.c
test/Sema/i-c-e.c
test/Sema/warn-unused-value.c
test/SemaCXX/overloaded-operator.cpp