Skip to content

Commit 3dca858

Browse files
andykaylorkcloudy0717
authored andcommitted
[CIR][NFC] Fix a release build warning (llvm#170359)
This moves a call inside an assert to avoid a warning about the result variable being unused in release builds.
1 parent d4d0f93 commit 3dca858

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

clang/lib/CIR/CodeGen/CIRGenClass.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ static void emitMemberInitializer(CIRGenFunction &cgf,
126126
lhs.isVolatileQualified());
127127
// Ensure that we destroy the objects if an exception is thrown later in
128128
// the constructor.
129-
QualType::DestructionKind dtorKind = fieldType.isDestructedType();
130-
assert(!cgf.needsEHCleanup(dtorKind) &&
129+
assert(!cgf.needsEHCleanup(fieldType.isDestructedType()) &&
131130
"Arrays of non-record types shouldn't need EH cleanup");
132131
return;
133132
}

0 commit comments

Comments
 (0)