]> granicus.if.org Git - clang/commit
Don't produce a 'returning reference to local' warning if a lambda returns a
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 30 Jan 2014 22:05:38 +0000 (22:05 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 30 Jan 2014 22:05:38 +0000 (22:05 +0000)
commite3732a5c428d5fb757a3ae6282d1cb4573f47c82
tree8ce2ebaf94d22cd249e0f1d19d36e63f65fc0462
parentfaa90eaedd9b4fdf2ad5351efcd553d6b820693a
Don't produce a 'returning reference to local' warning if a lambda returns a
reference (or pointer) to a variable from the closure object or from the
surrounding function scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200494 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/SemaCXX/return-stack-addr.cpp