We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 653e99e commit b675325Copy full SHA for b675325
clang/lib/Sema/SemaLambda.cpp
@@ -359,8 +359,8 @@ Sema::getCurrentMangleNumberContext(const DeclContext *DC) {
359
if (ManglingContextDecl) {
360
// Lambdas defined in the initializer of a local variable are mangled
361
// in the enclosing function context.
362
- if (isa<VarDecl>(ManglingContextDecl) &&
363
- !cast<VarDecl>(ManglingContextDecl)->hasGlobalStorage())
+ if (auto *VD = dyn_cast<VarDecl>(ManglingContextDecl);
+ VD && !VD->hasGlobalStorage())
364
ManglingContextDecl = nullptr;
365
}
366
return std::make_tuple(nullptr, ManglingContextDecl);
0 commit comments