[clang] [analyzer] Untangle subcheckers of CStringChecker (PR #113312)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 22 20:04:22 PDT 2024
================
@@ -768,9 +776,17 @@ ProgramStateRef CStringChecker::CheckOverlap(CheckerContext &C,
std::tie(stateTrue, stateFalse) = state->assume(*OverlapTest);
if (stateTrue && !stateFalse) {
- // Overlap!
- emitOverlapBug(C, stateTrue, First.Expression, Second.Expression);
- return nullptr;
+ if (Filter.CheckCStringBufferOverlap) {
+ // Overlap!
+ emitOverlapBug(C, stateTrue, First.Expression, Second.Expression);
+ return nullptr;
+ }
+ // FIXME: We detected a fatal error here, we should stop analysis even if we
+ // chose not to emit a report here. However, as long as our overlap checker
+ // is in alpha, lets just pretend nothing happened.
----------------
isuckatcs wrote:
Nit: same as in case of the copies of this section.
https://github.com/llvm/llvm-project/pull/113312
More information about the cfe-commits
mailing list