Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//== ArrayBoundCheckerV2.cpp ------------------------------------*- C++ -*--==//
//== ArrayBoundChecker.cpp -------------------------------------------------==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
Expand All @@ -11,12 +11,6 @@
//
//===----------------------------------------------------------------------===//

// NOTE: The name of this file ends with "V2" because previously
// "ArrayBoundChecker.cpp" contained the implementation of another (older and
// simpler) checker that was called `alpha.security.ArrayBound`.
// TODO: Rename this file to "ArrayBoundChecker.cpp" when it won't be confused
// with that older file.

#include "clang/AST/CharUnits.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/StaticAnalyzer/Checkers/BuiltinCheckerRegistration.h"
Expand Down Expand Up @@ -297,7 +291,8 @@ static std::pair<ProgramStateRef, ProgramStateRef>
compareValueToThreshold(ProgramStateRef State, NonLoc Value, NonLoc Threshold,
SValBuilder &SVB, bool CheckEquality = false) {
if (auto ConcreteThreshold = Threshold.getAs<nonloc::ConcreteInt>()) {
std::tie(Value, Threshold) = getSimplifiedOffsets(Value, *ConcreteThreshold, SVB);
std::tie(Value, Threshold) =
getSimplifiedOffsets(Value, *ConcreteThreshold, SVB);
}

// We want to perform a _mathematical_ comparison between the numbers `Value`
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/StaticAnalyzer/Checkers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set(LLVM_LINK_COMPONENTS
add_clang_library(clangStaticAnalyzerCheckers
AnalysisOrderChecker.cpp
AnalyzerStatsChecker.cpp
ArrayBoundCheckerV2.cpp
ArrayBoundChecker.cpp
BasicObjCFoundationChecks.cpp
BitwiseShiftChecker.cpp
BlockInCriticalSectionChecker.cpp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ static_library("Checkers") {
sources = [
"AnalysisOrderChecker.cpp",
"AnalyzerStatsChecker.cpp",
"ArrayBoundCheckerV2.cpp",
"ArrayBoundChecker.cpp",
"BasicObjCFoundationChecks.cpp",
"BitwiseShiftChecker.cpp",
"BlockInCriticalSectionChecker.cpp",
Expand Down