]> granicus.if.org Git - clang/commit
Replace the broken LambdaCapture::isInitCapture API.
authorJames Dennett <jdennett@google.com>
Thu, 7 May 2015 18:48:18 +0000 (18:48 +0000)
committerJames Dennett <jdennett@google.com>
Thu, 7 May 2015 18:48:18 +0000 (18:48 +0000)
commit73bd7cd7e4f9bf99bcc1bea87038f1266cdda548
treee71410a49a8b89aceaa2029feaa275e0cbebf70c
parent06e8ae74b426e03e1e1b11e29894917d21412adf
Replace the broken LambdaCapture::isInitCapture API.

A LambdaCapture does not have sufficient information
to correctly determine whether it is an init-capture or not.
Doing so requires knowledge held in the LambdaExpr itself.

It the case of a nested capture of an init-capture it is not
sufficient to check (as LambdaCapture::isInitCapture did)
whether the associated VarDecl was from an init-capture.

This patch moves isInitCapture to LambdaExpr and updates
Capture->isInitCapture() to Lambda->isInitCapture(Capture).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@236760 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/DataRecursiveASTVisitor.h
include/clang/AST/ExprCXX.h
include/clang/AST/LambdaCapture.h
include/clang/AST/RecursiveASTVisitor.h
lib/AST/ExprCXX.cpp
lib/AST/StmtPrinter.cpp
lib/Sema/TreeTransform.h
test/SemaCXX/cxx1y-init-captures.cpp