summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-unsequenced.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Teach -Wunsequenced that the side-effects of a function evaluation are sequencedRichard Smith2013-06-301-1/+11
| | | | | | | | | 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. llvm-svn: 185282
* PR16467: Teach -Wunsequenced that in C11 (unlike C++11), an assignment'sRichard Smith2013-06-261-0/+2
| | | | | | | | 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. llvm-svn: 185035
* Some builtins do not evaluate their arguments. Teach EvaluatedExprVisitor notRichard Smith2013-01-171-0/+5
| | | | | | to visit them. llvm-svn: 172769
* -Wunsequenced: if the LHS of an &&, || or ?: is not constant, check forRichard Smith2013-01-171-0/+7
| | | | | | | | | 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)'. llvm-svn: 172760
* Add -Wunsequenced (with compatibility alias -Wsequence-point) to warn onRichard Smith2013-01-171-0/+91
expressions which have undefined behavior due to multiple unsequenced modifications or an unsequenced modification and use of a variable. llvm-svn: 172690
OpenPOWER on IntegriCloud