Skip to content

Commit b675325

Browse files
committed
Addressed review comments.
1 parent 653e99e commit b675325

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Sema/SemaLambda.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,8 @@ Sema::getCurrentMangleNumberContext(const DeclContext *DC) {
359359
if (ManglingContextDecl) {
360360
// Lambdas defined in the initializer of a local variable are mangled
361361
// in the enclosing function context.
362-
if (isa<VarDecl>(ManglingContextDecl) &&
363-
!cast<VarDecl>(ManglingContextDecl)->hasGlobalStorage())
362+
if (auto *VD = dyn_cast<VarDecl>(ManglingContextDecl);
363+
VD && !VD->hasGlobalStorage())
364364
ManglingContextDecl = nullptr;
365365
}
366366
return std::make_tuple(nullptr, ManglingContextDecl);

0 commit comments

Comments
 (0)