diff --git a/clang/lib/Format/UnwrappedLineParser.h b/clang/lib/Format/UnwrappedLineParser.h index 8faa99bdb6b5c..4138baaabe269 100644 --- a/clang/lib/Format/UnwrappedLineParser.h +++ b/clang/lib/Format/UnwrappedLineParser.h @@ -40,26 +40,26 @@ struct UnwrappedLineNode; /// \c UnwrappedLineFormatter. The key property is that changing the formatting /// within an unwrapped line does not affect any other unwrapped lines. struct UnwrappedLine { - UnwrappedLine(); + UnwrappedLine() = default; /// The \c Tokens comprising this \c UnwrappedLine. std::list Tokens; /// The indent level of the \c UnwrappedLine. - unsigned Level; + unsigned Level = 0; /// The \c PPBranchLevel (adjusted for header guards) if this line is a /// \c InMacroBody line, and 0 otherwise. - unsigned PPLevel; + unsigned PPLevel = 0; /// Whether this \c UnwrappedLine is part of a preprocessor directive. - bool InPPDirective; + bool InPPDirective = false; /// Whether this \c UnwrappedLine is part of a pramga directive. - bool InPragmaDirective; + bool InPragmaDirective = false; /// Whether it is part of a macro body. - bool InMacroBody; + bool InMacroBody = false; - bool MustBeDeclaration; + bool MustBeDeclaration = false; /// \c True if this line should be indented by ContinuationIndent in /// addition to the normal indention level. @@ -410,11 +410,6 @@ struct UnwrappedLineNode { SmallVector Children; }; -inline UnwrappedLine::UnwrappedLine() - : Level(0), PPLevel(0), InPPDirective(false), InPragmaDirective(false), - InMacroBody(false), MustBeDeclaration(false), - MatchingOpeningBlockLineIndex(kInvalidIndex) {} - } // end namespace format } // end namespace clang