[PATCH] D24639: [Sema] Warn when returning a lambda that captures a local variable by reference
Erik Pilkington via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 12 05:25:22 PST 2016
erik.pilkington updated this revision to Diff 77717.
erik.pilkington added a comment.
This new patch rewrites the check to just use the captures in the lambda's CXXRecordDecl, instead of searching through the returned expression to find the LambdaExpr.
Thanks!
https://reviews.llvm.org/D24639
Files:
include/clang/AST/LambdaCapture.h
include/clang/Basic/DiagnosticSemaKinds.td
lib/Sema/SemaChecking.cpp
test/SemaCXX/cxx1y-generic-lambdas-capturing.cpp
test/SemaCXX/return-lambda-stack-addr.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24639.77717.patch
Type: text/x-patch
Size: 10540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161112/96684633/attachment-0001.bin>
More information about the cfe-commits
mailing list