[PATCH] D127838: [analyzer][NFC] Remove dead field of UnixAPICheckers

Balázs Benics via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 15 02:32:28 PDT 2022


steakhal created this revision.
steakhal added reviewers: kazu, martong.
Herald added subscribers: manas, ASDenysPetrov, dkrupp, donat.nagy, Szelethus, mikhail.ramalho, a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a reviewer: Szelethus.
Herald added a project: All.
steakhal requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

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

Depends on D127836 <https://reviews.llvm.org/D127836>, which uncovered this issue.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127838

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


Index: clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
+++ clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
@@ -43,8 +43,6 @@
   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 @@
     mgr.registerChecker<CHECKERNAME>();                                        \
   }                                                                            \
                                                                                \
-  bool ento::shouldRegister##CHECKERNAME(const CheckerManager &mgr) {              \
+  bool ento::shouldRegister##CHECKERNAME(const CheckerManager &mgr) {          \
     return true;                                                               \
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127838.437090.patch
Type: text/x-patch
Size: 1027 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220615/f06548cb/attachment.bin>


More information about the cfe-commits mailing list