[clang] 481f860 - [analyzer][NFC] Remove dead field of UnixAPICheckers

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 15 07:50:36 PDT 2022


Author: Balazs Benics
Date: 2022-06-15T16:50:12+02:00
New Revision: 481f8603246c725a27f937ec5fde4d68fa4584ae

URL: https://github.com/llvm/llvm-project/commit/481f8603246c725a27f937ec5fde4d68fa4584ae
DIFF: https://github.com/llvm/llvm-project/commit/481f8603246c725a27f937ec5fde4d68fa4584ae.diff

LOG: [analyzer][NFC] Remove dead field of UnixAPICheckers

Initially, I thought there is some fundamental bug here by not using the
bool fields, but it turns out D55425 split this checker into two
separate ones; making these fields dead.

Depends on D127836, which uncovered this issue.

Reviewed By: martong

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

Added: 
    

Modified: 
    clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
index 4e3024c1b06c..fffb7cd38955 100644
--- a/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
@@ -43,8 +43,6 @@ class UnixAPIMisuseChecker : public Checker< check::PreStmt<CallExpr> > {
   mutable Optional<uint64_t> Val_O_CREAT;
 
 public:
-  bool CheckMisuse = false, CheckPortability = false;
-
   void checkPreStmt(const CallExpr *CE, CheckerContext &C) const;
 
   void CheckOpen(CheckerContext &C, const CallExpr *CE) const;
@@ -503,7 +501,7 @@ void UnixAPIPortabilityChecker::checkPreStmt(const CallExpr *CE,
     mgr.registerChecker<CHECKERNAME>();                                        \
   }                                                                            \
                                                                                \
-  bool ento::shouldRegister##CHECKERNAME(const CheckerManager &mgr) {              \
+  bool ento::shouldRegister##CHECKERNAME(const CheckerManager &mgr) {          \
     return true;                                                               \
   }
 


        


More information about the cfe-commits mailing list