Author: Kazu Hirata Date: 2023-09-02T09:32:41-07:00 New Revision: 5ac7fb45e1750fadf123bcd958b3ffdd3d71027a
URL: https://github.com/llvm/llvm-project/commit/5ac7fb45e1750fadf123bcd958b3ffdd3d71027a DIFF: https://github.com/llvm/llvm-project/commit/5ac7fb45e1750fadf123bcd958b3ffdd3d71027a.diff LOG: [StaticAnalyzer] Modernize GTestChecker (NFC) Added: Modified: clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp Removed: ################################################################################ diff --git a/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp index 43d2eeeb4b275d..6c32a8dec844cb 100644 --- a/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/GTestChecker.cpp @@ -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 @@ 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_' _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits