diff --git a/explorer/interpreter/type_checker.cpp b/explorer/interpreter/type_checker.cpp index a84215221ee1..886da3295ddd 100644 --- a/explorer/interpreter/type_checker.cpp +++ b/explorer/interpreter/type_checker.cpp @@ -402,7 +402,7 @@ auto TypeChecker::ArgumentDeduction( if (!IsConcreteType(param_type)) { // Parameter type contains a nested `auto` and argument type isn't the // same kind of type. - // FIXME: This seems like something we should be able to accept. + // TODO: This seems like something we should be able to accept. return CompilationError(source_loc) << "type error in " << context << "\n" << "expected: " << *param_type << "\n" << "actual: " << *arg_type; @@ -536,7 +536,7 @@ auto TypeChecker::ArgumentDeduction( case Value::Kind::NominalClassType: { const auto& param_class_type = cast(*param_type); if (arg_type->kind() != Value::Kind::NominalClassType) { - // FIXME: We could determine the parameters of the class from field + // TODO: We could determine the parameters of the class from field // types in a struct argument. return handle_non_deduced_type(); } @@ -573,7 +573,7 @@ auto TypeChecker::ArgumentDeduction( } // For the following cases, we check the type matches. case Value::Kind::StaticArrayType: - // FIXME: We could deduce the array type from an array or tuple argument. + // TODO: We could deduce the array type from an array or tuple argument. case Value::Kind::ContinuationType: case Value::Kind::ChoiceType: case Value::Kind::IntType: @@ -639,7 +639,7 @@ auto TypeChecker::Substitute( const auto& fn_type = cast(*type); auto param = Substitute(dict, &fn_type.parameters()); auto ret = Substitute(dict, &fn_type.return_type()); - // FIXME: Only remove the bindings that are in `dict`; we may still need + // TODO: Only remove the bindings that are in `dict`; we may still need // to do deduction. return arena_->New(param, llvm::None, ret, llvm::None, llvm::None); @@ -995,7 +995,7 @@ auto TypeChecker::TypeCheckExp(Nonnull e, << "struct " << *struct_type << " does not have a field named " << access.field(); } - // FIXME: We should handle all types here, not only structs. For + // TODO: We should handle all types here, not only structs. For // example: // fn Main() -> i32 { // class Class { var n: i32; }; @@ -1167,7 +1167,7 @@ auto TypeChecker::TypeCheckExp(Nonnull e, default: break; } - // FIXME: Consider setting the static type of all interface member + // TODO: Consider setting the static type of all interface member // declarations and instance member declarations to be member name // types, rather than special-casing member accesses that name // them. @@ -1860,7 +1860,7 @@ auto TypeChecker::TypeCheckStmt(Nonnull s, auto& var = cast(*s); CARBON_RETURN_IF_ERROR(TypeCheckExp(&var.init(), impl_scope)); const Value& rhs_ty = var.init().static_type(); - // FIXME: If the pattern contains a binding that implies a new impl is + // TODO: If the pattern contains a binding that implies a new impl is // available, should that remain in scope for as long as its binding? // ``` // var a: (T:! Widget) = ...; diff --git a/explorer/interpreter/value.h b/explorer/interpreter/value.h index 11051cf5cc03..033049c36c5d 100644 --- a/explorer/interpreter/value.h +++ b/explorer/interpreter/value.h @@ -643,7 +643,7 @@ class InterfaceType : public Value { } auto args() const -> const BindingMap& { return args_; } - // FIXME: These aren't used for anything yet. + // TODO: These aren't used for anything yet. auto impls() const -> const ImplExpMap& { return impls_; } auto witnesses() const -> const ImplWitnessMap& { return witnesses_; } diff --git a/explorer/syntax/parser.ypp b/explorer/syntax/parser.ypp index 2dbf6a9ed693..ab0a15fa39dc 100644 --- a/explorer/syntax/parser.ypp +++ b/explorer/syntax/parser.ypp @@ -308,7 +308,7 @@ primary_expression: $$ = arena->New(context.source_loc()); } | SELF - // FIXME: Should we create a new TypeLiteral for `Self`? + // TODO: Should we create a new TypeLiteral for `Self`? { $$ = arena->New(context.source_loc(), "Self"); } | STRING { $$ = arena->New(context.source_loc()); } @@ -933,7 +933,7 @@ declaration: // TODO: Type of `Self` should be the interface being declared, not // `Type`. auto ty_ty = arena -> New(context.source_loc()); - // FIXME: Should this be switched to use a `SelfDeclaration` instead? + // TODO: Should this be switched to use a `SelfDeclaration` instead? auto self = arena -> New(context.source_loc(), "Self", ty_ty); $$ = arena->New(context.source_loc(), $2, $3, self, diff --git a/explorer/testdata/alias/fail_alias_var.carbon b/explorer/testdata/alias/fail_alias_var.carbon index 8eb64544c6f5..3819313dee13 100644 --- a/explorer/testdata/alias/fail_alias_var.carbon +++ b/explorer/testdata/alias/fail_alias_var.carbon @@ -11,7 +11,7 @@ package ExplorerTest api; var v: i32; -// FIXME: This should probably be valid if we allow global variables at all. +// TODO: This should probably be valid if we allow global variables at all. // CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/alias/fail_alias_var.carbon:[[@LINE+1]]: invalid target for alias declaration alias A = v; diff --git a/explorer/testdata/alias/member_name_alias.carbon b/explorer/testdata/alias/member_name_alias.carbon index 2dce696eeb9f..f6da101a1a7a 100644 --- a/explorer/testdata/alias/member_name_alias.carbon +++ b/explorer/testdata/alias/member_name_alias.carbon @@ -38,7 +38,7 @@ alias i32IM = i32.(IM); fn Main() -> i32 { var a: A = {.n = 0}; - // FIXME: Use != once we support it. + // TODO: Use != once we support it. if (not (A.(IF)() == 1)) { return 1; } diff --git a/explorer/testdata/generic_class/convert_from_struct.carbon b/explorer/testdata/generic_class/convert_from_struct.carbon index b24800e0d4a1..f0875a6bf853 100644 --- a/explorer/testdata/generic_class/convert_from_struct.carbon +++ b/explorer/testdata/generic_class/convert_from_struct.carbon @@ -25,6 +25,6 @@ fn GetY(T:! Type, pt: Point(T)) -> T { fn Main() -> i32 { var p: Point(i32) = {.x = 1, .y = 2}; - // FIXME: Should `GetX({.x = 1, .y = 2})` work? See #1251. + // TODO: Should `GetX({.x = 1, .y = 2})` work? See #1251. return GetX(p) + GetY(i32, {.x = 3, .y = 4}); } diff --git a/toolchain/driver/driver.cpp b/toolchain/driver/driver.cpp index ebf94b6eec19..575bab4c7748 100644 --- a/toolchain/driver/driver.cpp +++ b/toolchain/driver/driver.cpp @@ -71,7 +71,7 @@ auto Driver::RunFullCommand(llvm::ArrayRef args) -> bool { auto Driver::RunHelpSubcommand(DiagnosticConsumer& /*consumer*/, llvm::ArrayRef args) -> bool { - // FIXME: We should support getting detailed help on a subcommand by looking + // TODO: We should support getting detailed help on a subcommand by looking // for it as a positional parameter here. if (!args.empty()) { ReportExtraArgs("help", args); @@ -93,7 +93,7 @@ auto Driver::RunHelpSubcommand(DiagnosticConsumer& /*consumer*/, for (auto subcommand_and_help : SubcommandsAndHelp) { llvm::StringRef subcommand_text = subcommand_and_help[0]; - // FIXME: We should wrap this to the number of columns left after the + // TODO: We should wrap this to the number of columns left after the // subcommand on the terminal, and using a hanging indent. llvm::StringRef help_text = subcommand_and_help[1]; output_stream_ << " " diff --git a/toolchain/driver/flags.def b/toolchain/driver/flags.def index 39425e2d874f..f5712ed7f9b6 100644 --- a/toolchain/driver/flags.def +++ b/toolchain/driver/flags.def @@ -5,7 +5,7 @@ // Note: X-macro header. Do not use include guards. #ifndef CARBON_SUBCOMMAND -// FIXME: We should expand `HelpText` to be a short help name, a synopsis, and a +// TODO: We should expand `HelpText` to be a short help name, a synopsis, and a // long-form description. #define CARBON_SUBCOMMAND(Name, Spelling, HelpText) #endif diff --git a/toolchain/lexer/tokenized_buffer.cpp b/toolchain/lexer/tokenized_buffer.cpp index d2a6c4e961ad..d427b2e34cb5 100644 --- a/toolchain/lexer/tokenized_buffer.cpp +++ b/toolchain/lexer/tokenized_buffer.cpp @@ -166,7 +166,7 @@ class TokenizedBuffer::Lexer { case ' ': case '\t': // Skip other forms of whitespace while tracking column. - // FIXME: This obviously needs looooots more work to handle unicode + // TODO: This obviously needs looooots more work to handle unicode // whitespace as well as special handling to allow better tokenization // of operators. This is just a stub to check that our column // management works. diff --git a/toolchain/parser/parse_tree.h b/toolchain/parser/parse_tree.h index e520a5469047..9d761d2ed1ba 100644 --- a/toolchain/parser/parse_tree.h +++ b/toolchain/parser/parse_tree.h @@ -253,7 +253,7 @@ class ParseTree::Node { // Returns an opaque integer identifier of the node in the tree. Clients // should not expect any particular semantics from this value. // - // FIXME: Maybe we can switch to stream operator overloads? + // TODO: Maybe we can switch to stream operator overloads? [[nodiscard]] auto index() const -> int { return index_; } // Prints the node index. diff --git a/toolchain/parser/parse_tree_test.cpp b/toolchain/parser/parse_tree_test.cpp index d71156669520..8c9a9fa304e7 100644 --- a/toolchain/parser/parse_tree_test.cpp +++ b/toolchain/parser/parse_tree_test.cpp @@ -341,7 +341,7 @@ TEST_F(ParseTreeTest, FunctionDeclarationSkipIndentedNewlineUntilOutdent) { } TEST_F(ParseTreeTest, FunctionDeclarationSkipWithoutSemiToCurly) { - // FIXME: We don't have a grammar construct that uses curlies yet so this just + // TODO: We don't have a grammar construct that uses curlies yet so this just // won't parse at all. Once it does, we should ensure that the close brace // gets properly parsed for the struct (or whatever other curly-braced syntax // we have grouping function declarations) despite the invalid function @@ -660,12 +660,12 @@ TEST_F(ParseTreeTest, OperatorWhitespaceErrors) { {"var n: i8 = (n)*3;", Valid}, {"var n: i8 = 3*(n);", Valid}, {"var n: i8 = n *n;", Recovered}, - // FIXME: We could figure out that this first Failed example is infix + // TODO: We could figure out that this first Failed example is infix // with one-token lookahead. {"var n: i8 = n* n;", Failed}, {"var n: i8 = n* -n;", Failed}, {"var n: i8 = n* *p;", Failed}, - // FIXME: We try to form (n*)*p and reject due to missing parentheses + // TODO: We try to form (n*)*p and reject due to missing parentheses // before we notice the missing whitespace around the second `*`. // It'd be better to (somehow) form n*(*p) and reject due to the missing // whitespace around the first `*`. diff --git a/toolchain/parser/parser_impl.cpp b/toolchain/parser/parser_impl.cpp index ae44ac1bd93f..5b1ca711e601 100644 --- a/toolchain/parser/parser_impl.cpp +++ b/toolchain/parser/parser_impl.cpp @@ -432,7 +432,7 @@ auto ParseTree::Parser::ParseCodeBlock() -> llvm::Optional { if (!ParseStatement()) { // We detected and diagnosed an error of some kind. We can trivially skip // to the actual close curly brace from here. - // FIXME: It would be better to skip to the next semicolon, or the next + // TODO: It would be better to skip to the next semicolon, or the next // token at the start of a line with the same indent as this one. SkipTo(tokens_.GetMatchedClosingToken(open_curly)); has_errors = true; @@ -468,7 +468,7 @@ auto ParseTree::Parser::ParseFunctionDeclaration() -> Node { CARBON_DIAGNOSTIC(ExpectedFunctionName, Error, "Expected function name after `fn` keyword."); emitter_.Emit(*position_, ExpectedFunctionName); - // FIXME: We could change the lexer to allow us to synthesize certain + // TODO: We could change the lexer to allow us to synthesize certain // kinds of tokens and try to "recover" here, but unclear that this is // really useful. SkipPastLikelyEnd(function_intro_token, handle_semi_in_error_recovery); @@ -965,7 +965,7 @@ auto ParseTree::Parser::ParseOperatorExpression( NextTokenKind(), IsTrailingOperatorInfix())) { auto [operator_precedence, is_binary] = *trailing_operator; - // FIXME: If this operator is ambiguous with either the ambient precedence + // TODO: If this operator is ambiguous with either the ambient precedence // or the LHS precedence, and there's a variant with a different fixity // that would work, use that one instead for error recovery. if (PrecedenceGroup::GetPriority(ambient_precedence, operator_precedence) != @@ -1119,7 +1119,7 @@ auto ParseTree::Parser::ParseKeywordStatement(ParseNodeKind kind, CARBON_DIAGNOSTIC(ExpectedSemiAfter, Error, "Expected `;` after `{0}`.", TokenKind); emitter_.Emit(*position_, ExpectedSemiAfter, keyword_kind); - // FIXME: Try to skip to a semicolon to recover. + // TODO: Try to skip to a semicolon to recover. } return AddNode(kind, keyword, start, /*has_error=*/!semi || arg_error); }