Skip to content

Commit 83e31ad

Browse files
committed
[-Wunsafe-buffer-usage] Don't assert Array strategy is unimplemented
1 parent 38255d1 commit 83e31ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

clang/lib/Analysis/UnsafeBufferUsage.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,6 +1442,7 @@ PointerAssignmentGadget::getFixits(const FixitStrategy &S) const {
14421442
return std::nullopt;
14431443
case FixitStrategy::Kind::Iterator:
14441444
case FixitStrategy::Kind::Array:
1445+
return std::nullopt;
14451446
case FixitStrategy::Kind::Vector:
14461447
llvm_unreachable("unsupported strategies for FixableGadgets");
14471448
}
@@ -1461,6 +1462,7 @@ PointerInitGadget::getFixits(const FixitStrategy &S) const {
14611462
return std::nullopt;
14621463
case FixitStrategy::Kind::Iterator:
14631464
case FixitStrategy::Kind::Array:
1465+
return std::nullopt;
14641466
case FixitStrategy::Kind::Vector:
14651467
llvm_unreachable("unsupported strategies for FixableGadgets");
14661468
}
@@ -1519,6 +1521,7 @@ UPCAddressofArraySubscriptGadget::getFixits(const FixitStrategy &S) const {
15191521
case FixitStrategy::Kind::Wontfix:
15201522
case FixitStrategy::Kind::Iterator:
15211523
case FixitStrategy::Kind::Array:
1524+
return std::nullopt;
15221525
case FixitStrategy::Kind::Vector:
15231526
llvm_unreachable("unsupported strategies for FixableGadgets");
15241527
}
@@ -1853,6 +1856,7 @@ PointerDereferenceGadget::getFixits(const FixitStrategy &S) const {
18531856
}
18541857
case FixitStrategy::Kind::Iterator:
18551858
case FixitStrategy::Kind::Array:
1859+
return std::nullopt;
18561860
case FixitStrategy::Kind::Vector:
18571861
llvm_unreachable("FixitStrategy not implemented yet!");
18581862
case FixitStrategy::Kind::Wontfix:
@@ -1883,6 +1887,7 @@ UPCStandalonePointerGadget::getFixits(const FixitStrategy &S) const {
18831887
case FixitStrategy::Kind::Wontfix:
18841888
case FixitStrategy::Kind::Iterator:
18851889
case FixitStrategy::Kind::Array:
1890+
return std::nullopt;
18861891
case FixitStrategy::Kind::Vector:
18871892
llvm_unreachable("unsupported strategies for FixableGadgets");
18881893
}

0 commit comments

Comments
 (0)