summaryrefslogtreecommitdiff
path: root/test/SemaCXX/warn-unsequenced.cpp
Commit message (Collapse)AuthorAge
* Teach -Wunsequenced that the side-effects of a function evaluation are sequencedRichard Smith2013-06-30
| | | | | | | | | | before the value computation of the result. In C, this is implied by there being a sequence point after their evaluation, and in C++, it's implied by the side-effects being sequenced before the expressions and statements in the function body. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185282 91177308-0d34-0410-b5e6-96231b3b80d8
* PR16467: Teach -Wunsequenced that in C11 (unlike C++11), an assignment'sRichard Smith2013-06-26
| | | | | | | | | side-effect is not sequenced before its value computation. Also fix a mishandling of ?: expressions where the condition is constant that was exposed by the tests for this. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@185035 91177308-0d34-0410-b5e6-96231b3b80d8
* Some builtins do not evaluate their arguments. Teach EvaluatedExprVisitor notRichard Smith2013-01-17
| | | | | | | to visit them. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172769 91177308-0d34-0410-b5e6-96231b3b80d8
* -Wunsequenced: if the LHS of an &&, || or ?: is not constant, check forRichard Smith2013-01-17
| | | | | | | | | | unsequenced operations in the RHS. We don't compare the RHS with the rest of the expression yet; such checks will need care to avoid diagnosing unsequenced operations which are both in conditionally-evaluated subexpressions which actually can't occur together, such as in '(b && ++x) + (!b && ++x)'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172760 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn onRichard Smith2013-01-17
expressions which have undefined behavior due to multiple unsequenced modifications or an unsequenced modification and use of a variable. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172690 91177308-0d34-0410-b5e6-96231b3b80d8