Skip to content

Commit 3cdadc6

Browse files
author
mxms
committed
Minor nit, reorder expression
1 parent f534ebe commit 3cdadc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Analysis/UnsafeBufferUsage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) {
466466
// Array index wasn't an integer literal, let's see if it was an enum or
467467
// something similar
468468
const auto IntConst = Node.getIdx()->getIntegerConstantExpr(Finder->getASTContext());
469-
if (IntConst && *IntConst >= 0 && *IntConst < size) {
469+
if (IntConst && 0 <= *IntConst && *IntConst < size) {
470470
return true;
471471
}
472472

0 commit comments

Comments
 (0)