mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 00:06:05 +00:00
[-Wunsafe-buffer-usage] Fix warning after #102953
This commit is contained in:
parent
c1a750b8bf
commit
99313575b6
@ -2797,8 +2797,7 @@ fixVariable(const VarDecl *VD, FixitStrategy::Kind K,
|
||||
return {};
|
||||
}
|
||||
case FixitStrategy::Kind::Array: {
|
||||
if (VD->isLocalVarDecl())
|
||||
if (auto CAT = Ctx.getAsConstantArrayType(VD->getType()))
|
||||
if (VD->isLocalVarDecl() && Ctx.getAsConstantArrayType(VD->getType()))
|
||||
return fixVariableWithArray(VD, Tracker, Ctx, Handler);
|
||||
|
||||
DEBUG_NOTE_DECL_FAIL(VD, " : not a local const-size array");
|
||||
|
Loading…
x
Reference in New Issue
Block a user