Skip to content

Commit ec81c9b

Browse files
authored
[clang] Remove a redundant check in Mangle. NFC (#95071)
This addresses a review comment for PR #94987 Because that PR is a big automatic change, this change was moved in a separate one.
1 parent 529b43c commit ec81c9b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/AST/Mangle.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,8 @@ void MangleContext::mangleBlock(const DeclContext *DC, const BlockDecl *BD,
301301
} else {
302302
assert((isa<NamedDecl>(DC) || isa<BlockDecl>(DC)) &&
303303
"expected a NamedDecl or BlockDecl");
304-
if (isa<BlockDecl>(DC))
305-
for (; isa_and_nonnull<BlockDecl>(DC); DC = DC->getParent())
306-
(void) getBlockId(cast<BlockDecl>(DC), true);
304+
for (; isa_and_nonnull<BlockDecl>(DC); DC = DC->getParent())
305+
(void)getBlockId(cast<BlockDecl>(DC), true);
307306
assert((isa<TranslationUnitDecl>(DC) || isa<NamedDecl>(DC)) &&
308307
"expected a TranslationUnitDecl or a NamedDecl");
309308
if (const auto *CD = dyn_cast<CXXConstructorDecl>(DC))

0 commit comments

Comments
 (0)