Skip to content

Commit 03c8624

Browse files
[clang:ast] Avoid warning for unused var without assertions. (NFC) (#169822)
This PR avoids a compiler warning, which turns into an error with `-Werror`, for a variable introduced in #169276 and only used in an assertion (which is, thus, unused if compiled without assertions). Signed-off-by: Ingo Müller <[email protected]> Co-authored-by: Simon Pilgrim <[email protected]>
1 parent db85bab commit 03c8624

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/AST/ExprConstant.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12179,8 +12179,8 @@ static bool evalShiftWithCount(
1217912179
assert(Call->getNumArgs() == 2);
1218012180

1218112181
QualType SourceTy = Call->getArg(0)->getType();
12182-
QualType CountTy = Call->getArg(1)->getType();
12183-
assert(SourceTy->isVectorType() && CountTy->isVectorType());
12182+
assert(SourceTy->isVectorType() &&
12183+
Call->getArg(1)->getType()->isVectorType());
1218412184

1218512185
QualType DestEltTy = SourceTy->castAs<VectorType>()->getElementType();
1218612186
unsigned DestEltWidth = Source.getVectorElt(0).getInt().getBitWidth();

0 commit comments

Comments
 (0)