diff --git a/toolchain/lexer/tokenized_buffer.h b/toolchain/lexer/tokenized_buffer.h index a9c5c059edb2..6d891ab9b763 100644 --- a/toolchain/lexer/tokenized_buffer.h +++ b/toolchain/lexer/tokenized_buffer.h @@ -227,7 +227,7 @@ class TokenizedBuffer { // If true, the value is mantissa * 10^exponent. [[nodiscard]] auto IsDecimal() const -> bool { return is_decimal_; } - void Print(llvm::raw_ostream& output_stream) const { + auto Print(llvm::raw_ostream& output_stream) const -> void { output_stream << Mantissa() << "*" << (is_decimal_ ? "10" : "2") << "^" << Exponent(); } @@ -351,7 +351,7 @@ class TokenizedBuffer { // line-oriented shell tools from `grep` to `awk`. auto Print(llvm::raw_ostream& output_stream) const -> void; - // Prints a description of a single token. See `print` for details on the + // Prints a description of a single token. See `Print` for details on the // format. auto PrintToken(llvm::raw_ostream& output_stream, Token token) const -> void; @@ -400,8 +400,8 @@ class TokenizedBuffer { int index; int kind; - int column; int line; + int column; int indent; }; @@ -440,7 +440,7 @@ class TokenizedBuffer { int64_t start; // The byte length of the line. Does not include the newline character (or a - // null terminator or EOF). + // nul-terminator or EOF). int32_t length; // The byte offset from the start of the line of the first non-whitespace diff --git a/toolchain/source/source_buffer.cpp b/toolchain/source/source_buffer.cpp index b7dad7c8a397..539e9dca7993 100644 --- a/toolchain/source/source_buffer.cpp +++ b/toolchain/source/source_buffer.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "common/check.h"