Skip to content

Commit

Permalink
[StaticAnalyzer] Modernize GTestChecker (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
kazutakahirata committed Sep 2, 2023
1 parent 2fa1ad8 commit 5ac7fb4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ using namespace ento;
namespace {
class GTestChecker : public Checker<check::PostCall> {

mutable IdentifierInfo *AssertionResultII;
mutable IdentifierInfo *SuccessII;
mutable IdentifierInfo *AssertionResultII = nullptr;
mutable IdentifierInfo *SuccessII = nullptr;

public:
GTestChecker();
GTestChecker() = default;

void checkPostCall(const CallEvent &Call, CheckerContext &C) const;

Expand All @@ -120,8 +120,6 @@ class GTestChecker : public Checker<check::PostCall> {
};
} // End anonymous namespace.

GTestChecker::GTestChecker() : AssertionResultII(nullptr), SuccessII(nullptr) {}

/// Model a call to an un-inlined AssertionResult(bool) or
/// AssertionResult(bool &, ...).
/// To do so, constrain the value of the newly-constructed instance's 'success_'
Expand Down

0 comments on commit 5ac7fb4

Please sign in to comment.