summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/return-stack-addr.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't lifetime-extend or track lifetime problems through the LHS of '->*'.Richard Smith2018-07-241-0/+6
| | | | | | Fixes a false-positive warning found by selfhost. llvm-svn: 337857
* Fold -Wreturn-stack-address into general initialization lifetimeRichard Smith2018-07-231-1/+2
| | | | | | checking. llvm-svn: 337743
* Don't produce a 'returning reference to local' warning if a lambda returns aRichard Smith2014-01-301-3/+20
| | | | | | | reference (or pointer) to a variable from the closure object or from the surrounding function scope. llvm-svn: 200494
* Remove a type that got reduced away from this test case but not actually ↵Chandler Carruth2010-12-131-1/+0
| | | | | | deleted. llvm-svn: 121694
* Fix PR8774 by restricting when hasInit returns true. Previously, itChandler Carruth2010-12-131-0/+19
| | | | | | | | | | | | | | would return true if the initializer pointer union had *any* non-null pointer in it, even if the pointer wasn't one that would actually be returned via getInit(). This makes it more accurately model the logic of 'getInit() != NULL'. This still isn't completely satisfying. From a principled stance, I suspect we should make hasInit() and getInit() *always* return false and NULL (resp.) for ParmVarDecl. We shouldn't at the API level treat initializers and default arguments as the same thing. llvm-svn: 121692
* Enhance return-stack-address check (in Sema) to handle fields that ↵Ted Kremenek2010-09-021-0/+11
| | | | | | themselves are references. (Fixes PR 7999; fix by Chandler Carruth). llvm-svn: 112792
* 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
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Refactor the expression class hierarchy for casts. Most importantly:Douglas Gregor2008-10-271-1/+0
| | | | | | | | | | | | | | | | | | | | | | - CastExpr is the root of all casts - ImplicitCastExpr is (still) used for all explicit casts - ExplicitCastExpr is now the root of all *explicit* casts - ExplicitCCastExpr (new name needed!?) is a C-style cast in C or C++ - CXXFunctionalCastExpr inherits from ExplicitCastExpr - CXXNamedCastExpr inherits from ExplicitCastExpr and is the root of all of the C++ named cast expression types (static_cast, dynamic_cast, etc.) - Added classes CXXStaticCastExpr, CXXDynamicCastExpr, CXXReinterpretCastExpr, and CXXConstCastExpr to Also, fixed returned-stack-addr.cpp, which broke once when we fixed reinterpret_cast to diagnose double->int* conversions and again when we eliminated implicit conversions to reference types. The fix is in both testcase and SemaChecking.cpp. Most of this patch is simply support for the renaming. There's very little actual change in semantics. llvm-svn: 58264
* Fix some invalid casts that are detected by Sema now or soon.Sebastian Redl2008-10-271-3/+3
| | | | llvm-svn: 58252
* Move the rest of the Sema C++ tests into the SemaCXX test directory.Argyrios Kyrtzidis2008-08-221-0/+113
llvm-svn: 55178
OpenPOWER on IntegriCloud