[llvm] 68090a0 - [MCParser] Use default member initialization (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 18 20:55:02 PDT 2022
Author: Kazu Hirata
Date: 2022-06-18T20:54:56-07:00
New Revision: 68090a014cf5af8198a06bdecea0aeedc0c23023
URL: https://github.com/llvm/llvm-project/commit/68090a014cf5af8198a06bdecea0aeedc0c23023
DIFF: https://github.com/llvm/llvm-project/commit/68090a014cf5af8198a06bdecea0aeedc0c23023.diff
LOG: [MCParser] Use default member initialization (NFC)
Identified with modernize-use-default-member-init.
Added:
Modified:
llvm/lib/MC/MCParser/AsmParser.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp
index ccc8e80e76ff..8ee5102009e0 100644
--- a/llvm/lib/MC/MCParser/AsmParser.cpp
+++ b/llvm/lib/MC/MCParser/AsmParser.cpp
@@ -155,10 +155,10 @@ class AsmParser : public MCAsmParser {
/// The values from the last parsed cpp hash file line comment if any.
struct CppHashInfoTy {
StringRef Filename;
- int64_t LineNumber;
+ int64_t LineNumber = 0;
SMLoc Loc;
- unsigned Buf;
- CppHashInfoTy() : LineNumber(0), Buf(0) {}
+ unsigned Buf = 0;
+ CppHashInfoTy() = default;
};
CppHashInfoTy CppHashInfo;
More information about the llvm-commits
mailing list