[clang-tools-extra] 283427a - [clang-tidy] Modernize Handler (NFC)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Sat May 6 00:03:10 PDT 2023
Author: Kazu Hirata
Date: 2023-05-06T00:02:56-07:00
New Revision: 283427afd41097a04e5d0db95877c7a0bc10c7df
URL: https://github.com/llvm/llvm-project/commit/283427afd41097a04e5d0db95877c7a0bc10c7df
DIFF: https://github.com/llvm/llvm-project/commit/283427afd41097a04e5d0db95877c7a0bc10c7df.diff
LOG: [clang-tidy] Modernize Handler (NFC)
Added:
Modified:
clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp b/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp
index 2caf31b32365e..3c7e599a1acfa 100644
--- a/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp
+++ b/clang-tools-extra/clang-tidy/cert/StrToNumCheck.cpp
@@ -61,7 +61,7 @@ ConversionKind classifyFormatString(StringRef Fmt, const LangOptions &LO,
// specifiers, but that is acceptable behavior.
class Handler : public analyze_format_string::FormatStringHandler {
- ConversionKind CK;
+ ConversionKind CK = ConversionKind::None;
bool HandleScanfSpecifier(const analyze_scanf::ScanfSpecifier &FS,
const char *StartSpecifier,
@@ -117,7 +117,7 @@ ConversionKind classifyFormatString(StringRef Fmt, const LangOptions &LO,
}
public:
- Handler() : CK(ConversionKind::None) {}
+ Handler() = default;
ConversionKind get() const { return CK; }
};
More information about the cfe-commits
mailing list