summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/expr-comma-c99.c
Commit message (Collapse)AuthorAgeFilesLines
* Adding a -Wunused-value warning for expressions with side effects used in an ↵Aaron Ballman2014-12-171-2/+1
| | | | | | unevaluated expression context, such as sizeof(), or decltype(). Also adds a similar warning when the expression passed to typeid() *is* evaluated, since it is equally likely that the user would expect the expression operand to be unevaluated in that case. llvm-svn: 224465
* Sema: Warn on sizeof on binary ops on decayed arrays.Benjamin Kramer2013-03-291-1/+1
| | | | | | | | | | | | | The array will decay into a pointer, creating an unexpected result. sizeof(array + int) is an easy to make typo for sizeof(array) + int. This was motivated by a NetBSD security bug, used sizeof(key - r) instead of sizeof(key) - r, reducing entropy in a random number generator. http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/subr_cprng.c.diff?r1=1.14&r2=1.15&only_with_tag=MAIN&f=h Differential Revision: http://llvm-reviews.chandlerc.com/D571 llvm-svn: 178371
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Rename test/Sema/expr-comma-c89.c to expr-comma-c99.c. Spotted byPeter Collingbourne2011-02-251-0/+17
Anton Lokhmotov. llvm-svn: 126482
OpenPOWER on IntegriCloud