[StaticAnalyzer] Modernize GTestChecker (NFC)

This commit is contained in:
Kazu Hirata 2023-09-02 09:32:41 -07:00
parent 2fa1ad8a02
commit 5ac7fb45e1

View File

@ -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;
@ -120,8 +120,6 @@ private:
};
} // 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_'