Skip to content

Commit 9931357

Browse files
committed
[-Wunsafe-buffer-usage] Fix warning after #102953
1 parent c1a750b commit 9931357

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/Analysis/UnsafeBufferUsage.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,9 +2797,8 @@ fixVariable(const VarDecl *VD, FixitStrategy::Kind K,
27972797
return {};
27982798
}
27992799
case FixitStrategy::Kind::Array: {
2800-
if (VD->isLocalVarDecl())
2801-
if (auto CAT = Ctx.getAsConstantArrayType(VD->getType()))
2802-
return fixVariableWithArray(VD, Tracker, Ctx, Handler);
2800+
if (VD->isLocalVarDecl() && Ctx.getAsConstantArrayType(VD->getType()))
2801+
return fixVariableWithArray(VD, Tracker, Ctx, Handler);
28032802

28042803
DEBUG_NOTE_DECL_FAIL(VD, " : not a local const-size array");
28052804
return {};

0 commit comments

Comments
 (0)