diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp b/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp index 312bc749b1815..cb5b01009f1d9 100644 --- a/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/ArrayBoundChecker.cpp @@ -25,7 +25,8 @@ using namespace ento;  namespace {  class ArrayBoundChecker :       public Checker<check::Location> { -  mutable OwningPtr<BuiltinBug> BT; +  mutable std::unique_ptr<BuiltinBug> BT; +  public:    void checkLocation(SVal l, bool isLoad, const Stmt* S,                       CheckerContext &C) const; @@ -66,8 +67,9 @@ void ArrayBoundChecker::checkLocation(SVal l, bool isLoad, const Stmt* LoadS,        return;      if (!BT) -      BT.reset(new BuiltinBug("Out-of-bound array access", -                       "Access out-of-bound array element (buffer overflow)")); +      BT.reset(new BuiltinBug( +          this, "Out-of-bound array access", +          "Access out-of-bound array element (buffer overflow)"));      // FIXME: It would be nice to eventually make this diagnostic more clear,      // e.g., by referencing the original declaration or by saying *why* this  | 
