|
1 |
| -//== ArrayBoundCheckerV2.cpp ------------------------------------*- C++ -*--==// |
| 1 | +//== ArrayBoundChecker.cpp -------------------------------------------------==// |
2 | 2 | //
|
3 | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
4 | 4 | // See https://llvm.org/LICENSE.txt for license information.
|
|
11 | 11 | //
|
12 | 12 | //===----------------------------------------------------------------------===//
|
13 | 13 |
|
14 |
| -// NOTE: The name of this file ends with "V2" because previously |
15 |
| -// "ArrayBoundChecker.cpp" contained the implementation of another (older and |
16 |
| -// simpler) checker that was called `alpha.security.ArrayBound`. |
17 |
| -// TODO: Rename this file to "ArrayBoundChecker.cpp" when it won't be confused |
18 |
| -// with that older file. |
19 |
| - |
20 | 14 | #include "clang/AST/CharUnits.h"
|
21 | 15 | #include "clang/AST/ParentMapContext.h"
|
22 | 16 | #include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
|
@@ -297,7 +291,8 @@ static std::pair<ProgramStateRef, ProgramStateRef>
|
297 | 291 | compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold,
|
298 | 292 | SValBuilder &SVB, bool CheckEquality = false) {
|
299 | 293 | if (auto ConcreteThreshold = Threshold.getAs<nonloc::ConcreteInt>()) {
|
300 |
| - std::tie(Value, Threshold) = getSimplifiedOffsets(Value, *ConcreteThreshold, SVB); |
| 294 | + std::tie(Value, Threshold) = |
| 295 | + getSimplifiedOffsets(Value, *ConcreteThreshold, SVB); |
301 | 296 | }
|
302 | 297 |
|
303 | 298 | // We want to perform a _mathematical_ comparison between the numbers `Value`
|
|
0 commit comments