[clang] 8131ee4 - [analyzer] Remove NotifyAssumeClients

Gabor Marton via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 7 04:02:39 PDT 2022


Author: Gabor Marton
Date: 2022-06-07T13:02:03+02:00
New Revision: 8131ee4c43a8e33547628a313bf5ced9daed0045

URL: https://github.com/llvm/llvm-project/commit/8131ee4c43a8e33547628a313bf5ced9daed0045
DIFF: https://github.com/llvm/llvm-project/commit/8131ee4c43a8e33547628a313bf5ced9daed0045.diff

LOG: [analyzer] Remove NotifyAssumeClients

Depends on D126560.

Differential Revision: https://reviews.llvm.org/D126878

Added: 
    

Modified: 
    clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
    clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
index de08ac52a11d..11c60b689562 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h
@@ -130,20 +130,10 @@ class ConstraintManager {
   /// Convenience method to query the state to see if a symbol is null or
   /// not null, or if neither assumption can be made.
   ConditionTruthVal isNull(ProgramStateRef State, SymbolRef Sym) {
-    SaveAndRestore<bool> DisableNotify(NotifyAssumeClients, false);
-
     return checkNull(State, Sym);
   }
 
 protected:
-  /// A flag to indicate that clients should be notified of assumptions.
-  /// By default this is the case, but sometimes this needs to be restricted
-  /// to avoid infinite recursions within the ConstraintManager.
-  ///
-  /// Note that this flag allows the ConstraintManager to be re-entrant,
-  /// but not thread-safe.
-  bool NotifyAssumeClients = true;
-
   /// A helper class to simulate the call stack of nested assume calls.
   class AssumeStackTy {
   public:

diff  --git a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
index 7460b51a7697..dcb6043e9df3 100644
--- a/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
+++ b/clang/lib/StaticAnalyzer/Core/SimpleConstraintManager.cpp
@@ -44,7 +44,7 @@ ProgramStateRef SimpleConstraintManager::assumeInternal(ProgramStateRef State,
 ProgramStateRef SimpleConstraintManager::assume(ProgramStateRef State,
                                                 NonLoc Cond, bool Assumption) {
   State = assumeAux(State, Cond, Assumption);
-  if (NotifyAssumeClients && EE)
+  if (EE)
     return EE->processAssume(State, Cond, Assumption);
   return State;
 }


        


More information about the cfe-commits mailing list