Skip to content

Commit

Permalink
[analyzer][NFC] Remove dead field of UnixAPICheckers
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Balazs Benics committed Jun 15, 2022
1 parent 6c4f999 commit 481f860
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions clang/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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; \
}

Expand Down

0 comments on commit 481f860

Please sign in to comment.