summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/warn-unused-variables.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR8455: Handle an attribute between a goto label and a variable declaration perRichard Smith2013-11-151-1/+24
| | | | | | | the GNU documentation: the attribute only appertains to the label if it is followed by a semicolon. Based on a patch by Aaron Ballman! llvm-svn: 194869
* Suppress -Wunused-variable for variables declared in headers, which may inMatt Beaumont-Gay2013-04-101-9/+2
| | | | | | | | | | | fact be defined and used in another TU. Reshuffle some test cases because we suppress -Wunused-variable after we've emitted an error. This fixes PR15558. llvm-svn: 179138
* Fix false positive in -Wunused-variable when a ctor call make involve cleanups.David Blaikie2012-10-241-0/+12
| | | | llvm-svn: 166625
* Fix a crash-on-invalid when parsing a reference to an invalid auto declarationDavid Blaikie2012-10-101-2/+3
| | | | | | | | | auto x((unknown)); int& y = x; would crash because we were not flagging 'x' as an invalid declaration here. llvm-svn: 165675
* Improvements to the uninitialized variable warning: Check if the constructorRafael Espindola2012-01-061-0/+42
| | | | | | | call is elidable or if the constructor is trivial instead of checking if it is user declared. llvm-svn: 147652
* Fix PR10168: don't warn for unused non-dependent variables in both the ↵Richard Smith2011-06-211-0/+26
| | | | | | template definition and each instantiation. llvm-svn: 133580
* Clean up the tests for warning about unused function results given theChandler Carruth2011-02-211-11/+0
| | | | | | | | appropriate attribute. Add a bit more testing that finds a pretty bad regression (since ~forever) in this warning. Fix it with a nice 2 line change. =] llvm-svn: 126098
* Make #pragma unused work for static local variables.Douglas Gregor2010-11-091-0/+6
| | | | llvm-svn: 118500
* Revert r114316, -Wunused-value enabled by default was intended.Argyrios Kyrtzidis2010-09-191-1/+1
| | | | llvm-svn: 114318
* Make -Wunused-value off by default, matching GCC. Fixes rdar://7126194.Argyrios Kyrtzidis2010-09-191-1/+1
| | | | llvm-svn: 114316
* Reinstate the fix for PR7556. A silly use of isTrivial() wasDouglas Gregor2010-07-081-1/+1
| | | | | | suppressing copies of objects with trivial copy constructors. llvm-svn: 107857
* Revert r107828 and r107827, the fix for PR7556, which seems to beDouglas Gregor2010-07-071-1/+1
| | | | | | breaking bootstrap on Linux. llvm-svn: 107837
* Do not use CXXZeroValueInitExpr for class types. Instead, useDouglas Gregor2010-07-071-1/+1
| | | | | | | | | CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as appropriate. Fixes PR7556, and provides a slide codegen improvement when copy-initializing a POD class type from a value-initialized temporary. Previously, we weren't eliding the copy. llvm-svn: 107827
* Don't look into incomplete types when trying to warn about unusedDouglas Gregor2010-04-271-0/+8
| | | | | | variables. Fixes PR6948. llvm-svn: 102436
* When we have a dependent direct initializer but not a dependentDouglas Gregor2010-02-111-5/+13
| | | | | | | | variable type, we can (and should) still check for completeness of the variable's type. Do so, to work around an assertion that shows up in Boost's shared_ptr. llvm-svn: 95934
* support the warn_unused_result in C++ class methodsNuno Lopes2009-12-241-0/+11
| | | | llvm-svn: 92095
* Update tests to use %clang instead of 'clang', and forcibly disable use of 'Daniel Dunbar2009-12-151-1/+1
| | | | | | | clang ' or ' clang -cc1 ' or ' clang-cc ' in test lines (by substituting them to garbage). llvm-svn: 91460
* Fix PR5531.Anders Carlsson2009-11-171-0/+20
| | | | llvm-svn: 89106
* Add bug number.Anders Carlsson2009-11-071-2/+2
| | | | llvm-svn: 86357
* Don't treat variables with non-trivial ctors or dtors as unused. Fixes PR5407.Anders Carlsson2009-11-071-0/+8
| | | | llvm-svn: 86352
* Implement support for -Wunused-variable, from Oscar Bonilla!Douglas Gregor2009-10-081-0/+6
llvm-svn: 83577
OpenPOWER on IntegriCloud