diff options
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp')
| -rw-r--r-- | lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp | 16 | 
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp b/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp index 5e777803af00..62a4c2ab0209 100644 --- a/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/TrustNonnullChecker.cpp @@ -1,9 +1,8 @@  //== TrustNonnullChecker.cpp --------- API nullability modeling -*- C++ -*--==//  // -//                     The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception  //  //===----------------------------------------------------------------------===//  // @@ -88,7 +87,7 @@ public:      if (isNonNullPtr(Call, C))        if (auto L = Call.getReturnValue().getAs<Loc>()) -        State = State->assume(*L, /*Assumption=*/true); +        State = State->assume(*L, /*assumption=*/true);      C.addTransition(State);    } @@ -107,7 +106,7 @@ public:          (Msg.getSelector() == SetObjectForKeyedSubscriptSel ||           Msg.getSelector() == SetObjectForKeySel)) {        if (auto L = Msg.getArgSVal(1).getAs<Loc>()) -        State = State->assume(*L, /*Assumption=*/true); +        State = State->assume(*L, /*assumption=*/true);      }      // Record an implication: index is non-null if the output is non-null. @@ -249,7 +248,10 @@ private:  } // end empty namespace -  void ento::registerTrustNonnullChecker(CheckerManager &Mgr) {    Mgr.registerChecker<TrustNonnullChecker>(Mgr.getASTContext());  } + +bool ento::shouldRegisterTrustNonnullChecker(const LangOptions &LO) { +  return true; +}  | 
