summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/vararg-non-pod.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Lit C++11 Compatibility Patch #7Charles Li2016-04-131-20/+92
| | | | | | | 13 tests have been updated for C++11 compatibility. Differential Revision: http://reviews.llvm.org/D19068 llvm-svn: 266239
* Adding a -Wunused-value warning for expressions with side effects used in an ↵Aaron Ballman2014-12-171-1/+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
* Don't trap when passing non-POD arguments to variadic functions in ↵Hans Wennborg2014-09-291-0/+3
| | | | | | | | | | | | | | | | | | MS-compatibility mode Clang warns (treated as error by default, but still ignored in system headers) when passing non-POD arguments to variadic functions, and generates a trap instruction to crash the program if that code is ever run. Unfortunately, MSVC happily generates code for such calls without a warning, and there is code in system headers that use it. This makes Clang not insert the trap instruction when in -fms-compatibility mode, while still generating the warning/error message. Differential Revision: http://reviews.llvm.org/D5492 llvm-svn: 218640
* Extend -Wnon-pod-varargs to check calls made from member pointers.Richard Trieu2013-06-221-3/+3
| | | | llvm-svn: 184629
* Extend -Wnon-pod-varargs to more cases, such as function pointers as returnRichard Trieu2013-06-221-0/+36
| | | | | | types and function pointer arrays. llvm-svn: 184616
* Extend -Wnon-pod-varargs to check calls made from function pointers.Richard Trieu2013-06-201-1/+13
| | | | llvm-svn: 184470
* Make sure we perform the variadic method check correctly for calls to a ↵Eli Friedman2012-10-111-0/+18
| | | | | | member operator(). PR14057. llvm-svn: 165678
* [frontend] Don't allow a mapping to a warning override an error/fatal mapping.Chad Rosier2012-02-031-1/+1
| | | | | | rdar://10736625 llvm-svn: 149662
* Make clang's AST model sizeof and typeof with potentially-evaluated operands ↵Eli Friedman2012-01-211-0/+5
| | | | | | correctly, similar to what we already do with typeid. llvm-svn: 148610
* Revert r148271; this requires more thought.Eli Friedman2012-01-171-2/+1
| | | | llvm-svn: 148276
* Change the behavior of the lvalue-to-rvalue conversion for varargs in ↵Eli Friedman2012-01-171-1/+2
| | | | | | | | PotentiallyPotentiallyEvaluated contexts so that we model it in a sane way in most cases, and give up for the edge case which hopefully doesn't matter too much. In preparation for correctly treating sizeof() as a PotentiallyPotentiallyEvaluated context. llvm-svn: 148271
* Don't try to diagnose anything when we're passing incomplete typesDouglas Gregor2011-10-141-1/+0
| | | | | | | | through varargs. This only happens when we're in an unevaluated context, where we don't want to trigger an error anyway. Fixes PR11131 / <rdar://problem/10288375>. llvm-svn: 141986
* Properly diagnose using abstract and incomplete types in va_argDavid Majnemer2011-06-141-0/+18
| | | | | | | - Move a test from test/SemaTemplate/instantiate-expr-3.cpp, it did not belong there - Incomplete and abstract types are considered hard errors llvm-svn: 132979
* Fix our handling of the warning when one tries to pass aDouglas Gregor2011-05-211-3/+6
| | | | | | | | | | | | non-POD/non-trivial object throuugh a C-style varargs. The warning itself was default-mapped to error, but can be downgraded, but we were treating it in Sema like a hard error, silently dropping the call. Instead, treat this problem like a warning, and do what the warning says we do: abort at runtime. To do so, we fake up a __builtin_trap() expression that gets evaluated as part of the argument. llvm-svn: 131805
* really use valist.Chris Lattner2010-05-161-1/+2
| | | | llvm-svn: 103900
* fix rdar://7985267 - Don't emit an error about a non-pod argumentChris Lattner2010-05-161-0/+9
| | | | | | passed to va_start, it doesn't actually pass it. llvm-svn: 103899
* When pretty-printing tag types, only print the tag if we're in C (andJohn McCall2010-03-101-8/+8
| | | | | | | | | | therefore not creating ElaboratedTypes, which are still pretty-printed with the written tag). Most of these testcase changes were done by script, so don't feel too sorry for my fingers. llvm-svn: 98149
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* When certain diagnostics involving run-time behavior would be emittedDouglas Gregor2009-12-121-0/+13
| | | | | | | | in a potentially potentially evaluated context, queue those diagnostics and only emit them if the context ends up being potentially evaluated. This completes the fix for PR5761. llvm-svn: 91213
* Suppress warnings and errors about certain uses of non-POD types (inDouglas Gregor2009-12-121-0/+9
| | | | | | | | __builtin_offsetof, passing through an ellipsis) when we're in an unevaluated context. This is the first part of the fix to PR5761, which deals with the simple case of an unevaluated context. llvm-svn: 91210
* Give the "cannot pass object of non-POD type 'class C' through variadic ↵Chris Lattner2009-12-111-1/+1
| | | | | | constructor; call will abort at runtime" warning a -W flag (non-pod-varargs) and default it being an error by default. There is no good reason to allow users to get bitten by this sort of thing by default. llvm-svn: 91094
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-1/+1
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Handle variadic constructors better. Share code between ↵Anders Carlsson2009-09-081-1/+13
| | | | | | BuildCXXConstructExpr and BuildCXXTemporaryObjectExpr. llvm-svn: 81181
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Use a single function for doing vararg argument promotion. Also, make sure ↵Anders Carlsson2009-01-161-0/+7
| | | | | | to do the promotion before checking the type - fixes PR3340. llvm-svn: 62323
* Warn when someone tries to pass a variable with a non-POD type to a varargs ↵Anders Carlsson2009-01-131-0/+49
function/method/block. llvm-svn: 62148
OpenPOWER on IntegriCloud