aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Analysis/AnalysisDeclContext.cpp
diff options
context:
space:
mode:
authorCorentin Jabot <corentinjabot@gmail.com>2022-08-03 20:59:36 +0200
committerCorentin Jabot <corentinjabot@gmail.com>2022-08-03 21:00:29 +0200
commita274219600ea00c4406248acfbea113e29a8ead2 (patch)
treecbbffd3653ec77bae4ee8e2ee931a942d96a4fc3 /clang/lib/Analysis/AnalysisDeclContext.cpp
parent1f64f8bcabb65c9622386d7458e42ee33b2eb7dc (diff)
downloadllvm-a274219600ea00c4406248acfbea113e29a8ead2.zip
llvm-a274219600ea00c4406248acfbea113e29a8ead2.tar.gz
llvm-a274219600ea00c4406248acfbea113e29a8ead2.tar.bz2
Revert "[Clang][C++20] Support capturing structured bindings in lambdas"
This reverts commit 44f2baa3804a62ca793f0ff3e43aa71cea91a795. Breaks self builds and seems to have conformance issues.
Diffstat (limited to 'clang/lib/Analysis/AnalysisDeclContext.cpp')
-rw-r--r--clang/lib/Analysis/AnalysisDeclContext.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Analysis/AnalysisDeclContext.cpp b/clang/lib/Analysis/AnalysisDeclContext.cpp
index f72c75a..f209246 100644
--- a/clang/lib/Analysis/AnalysisDeclContext.cpp
+++ b/clang/lib/Analysis/AnalysisDeclContext.cpp
@@ -142,7 +142,7 @@ bool AnalysisDeclContext::isBodyAutosynthesizedFromModelFile() const {
/// Returns true if \param VD is an Objective-C implicit 'self' parameter.
static bool isSelfDecl(const VarDecl *VD) {
- return isa_and_nonnull<ImplicitParamDecl>(VD) && VD->getName() == "self";
+ return isa<ImplicitParamDecl>(VD) && VD->getName() == "self";
}
const ImplicitParamDecl *AnalysisDeclContext::getSelfDecl() const {
@@ -169,8 +169,8 @@ const ImplicitParamDecl *AnalysisDeclContext::getSelfDecl() const {
if (!LC.capturesVariable())
continue;
- ValueDecl *VD = LC.getCapturedVar();
- if (isSelfDecl(dyn_cast<VarDecl>(VD)))
+ VarDecl *VD = LC.getCapturedVar();
+ if (isSelfDecl(VD))
return dyn_cast<ImplicitParamDecl>(VD);
}