diff --git a/diagnostics/diagnostic_emitter.h b/diagnostics/diagnostic_emitter.h index 56f97fb4bb3d..704f3990667a 100644 --- a/diagnostics/diagnostic_emitter.h +++ b/diagnostics/diagnostic_emitter.h @@ -80,7 +80,8 @@ inline auto NullDiagnosticEmitter() -> DiagnosticEmitter& { } // CRTP base class for diagnostics with no substitutions. -template struct SimpleDiagnostic { +template +struct SimpleDiagnostic { struct Substitutions {}; static auto Format(const Substitutions&) -> std::string { return Derived::Message.str(); diff --git a/lexer/tokenized_buffer.cpp b/lexer/tokenized_buffer.cpp index 295afef9f7df..9344c6acb903 100644 --- a/lexer/tokenized_buffer.cpp +++ b/lexer/tokenized_buffer.cpp @@ -62,9 +62,9 @@ struct InvalidDigit { static auto Format(const Substitutions& subst) -> std::string { return llvm::formatv("Invalid digit '{0}' in {1} numeric literal.", subst.digit, - (subst.radix == 2 ? "binary" - : subst.radix == 16 ? "hexadecimal" - : "decimal")) + (subst.radix == 2 + ? "binary" + : subst.radix == 16 ? "hexadecimal" : "decimal")) .str(); } }; @@ -127,9 +127,7 @@ struct UnrecognizedCharacters : SimpleDiagnostic { // TODO(zygoloid): Update this to match whatever we decide qualifies as // acceptable whitespace. -static bool isSpace(char c) { - return c == ' ' || c == '\n' || c == '\t'; -} +static bool isSpace(char c) { return c == ' ' || c == '\n' || c == '\t'; } static bool isLower(char c) { return 'a' <= c && c <= 'z'; }