summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/return-stack-addr-2.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fold -Wreturn-stack-address into general initialization lifetimeRichard Smith2018-07-231-1/+1
| | | | | | checking. llvm-svn: 337743
* Fix typos from r277797 and unused variable from r277889.Richard Trieu2016-08-061-3/+0
| | | | llvm-svn: 277900
* Fix two false positives in -Wreturn-stack-addressRichard Trieu2016-08-051-1/+63
| | | | | | | | | | | If the return type is a pointer and the function returns the reference to a pointer, don't warn since only the value is returned, not the reference. If a reference function parameter appears in the reference chain, don't warn since binding happens at the caller scope, so addresses returned are not to local stack. This includes default arguments as well. llvm-svn: 277889
* Sema: prevent assertion on stack return checkingSaleem Abdulrasool2016-02-151-0/+22
In the case that the array indexing itself is within a type dependent context, bail out of the evaluation. We would previously try to symbolically evaluate the expression which would then try to evaluate a non-address expression as an address, triggering an assertion in Asserts builds. We only need to consider the array subscript expression itself as in the case that the base itself being type dependent is handled appropriately in EvalAddr. Resolves PR26599. llvm-svn: 260867
OpenPOWER on IntegriCloud