[clang] a8931a1 - [StaticAnalyzer] Modernize VforkChecker (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 27 16:14:07 PDT 2023
Author: Kazu Hirata
Date: 2023-08-27T16:13:53-07:00
New Revision: a8931a1ff76c74649dcdc8325e51a5cd0196839d
URL: https://github.com/llvm/llvm-project/commit/a8931a1ff76c74649dcdc8325e51a5cd0196839d
DIFF: https://github.com/llvm/llvm-project/commit/a8931a1ff76c74649dcdc8325e51a5cd0196839d.diff
LOG: [StaticAnalyzer] Modernize VforkChecker (NFC)
Added:
Modified:
clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
Removed:
################################################################################
diff --git a/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
index 86a4e6fbcd6ac8..70e14b48a6efde 100644
--- a/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp
@@ -46,7 +46,7 @@ class VforkChecker : public Checker<check::PreCall, check::PostCall,
check::Bind, check::PreStmt<ReturnStmt>> {
mutable std::unique_ptr<BuiltinBug> BT;
mutable llvm::SmallSet<const IdentifierInfo *, 10> VforkAllowlist;
- mutable const IdentifierInfo *II_vfork;
+ mutable const IdentifierInfo *II_vfork = nullptr;
static bool isChildProcess(const ProgramStateRef State);
@@ -58,7 +58,7 @@ class VforkChecker : public Checker<check::PreCall, check::PostCall,
const char *Details = nullptr) const;
public:
- VforkChecker() : II_vfork(nullptr) {}
+ VforkChecker() = default;
void checkPreCall(const CallEvent &Call, CheckerContext &C) const;
void checkPostCall(const CallEvent &Call, CheckerContext &C) const;
More information about the cfe-commits
mailing list