[all-commits] [llvm/llvm-project] 9eef4d: Remove delayed typo expressions (#143423)

Aaron Ballman via All-commits all-commits at lists.llvm.org
Fri Jun 13 03:46:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9eef4d1c5fa6b1bcbbe675c14ca8301d5d346f7b
      https://github.com/llvm/llvm-project/commit/9eef4d1c5fa6b1bcbbe675c14ca8301d5d346f7b
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2025-06-13 (Fri, 13 Jun 2025)

  Changed paths:
    M clang-tools-extra/clangd/unittests/HoverTests.cpp
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/AST/Expr.h
    M clang/include/clang/AST/RecursiveASTVisitor.h
    M clang/include/clang/Basic/StmtNodes.td
    M clang/include/clang/Parse/Parser.h
    M clang/include/clang/Sema/Sema.h
    M clang/include/clang/Sema/SemaInternal.h
    M clang/lib/AST/Expr.cpp
    M clang/lib/AST/ExprClassification.cpp
    M clang/lib/AST/ExprConstant.cpp
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/AST/StmtPrinter.cpp
    M clang/lib/AST/StmtProfile.cpp
    M clang/lib/Parse/ParseCXXInlineMethods.cpp
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Parse/ParseDeclCXX.cpp
    M clang/lib/Parse/ParseExpr.cpp
    M clang/lib/Parse/ParseExprCXX.cpp
    M clang/lib/Parse/ParseInit.cpp
    M clang/lib/Parse/ParseObjc.cpp
    M clang/lib/Parse/ParseOpenACC.cpp
    M clang/lib/Parse/ParseOpenMP.cpp
    M clang/lib/Parse/ParseStmt.cpp
    M clang/lib/Parse/ParseStmtAsm.cpp
    M clang/lib/Parse/ParseTemplate.cpp
    M clang/lib/Sema/Sema.cpp
    M clang/lib/Sema/SemaChecking.cpp
    M clang/lib/Sema/SemaCoroutine.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaDeclCXX.cpp
    M clang/lib/Sema/SemaExceptionSpec.cpp
    M clang/lib/Sema/SemaExpr.cpp
    M clang/lib/Sema/SemaExprCXX.cpp
    M clang/lib/Sema/SemaExprMember.cpp
    M clang/lib/Sema/SemaLookup.cpp
    M clang/lib/Sema/SemaObjC.cpp
    M clang/lib/Sema/SemaOverload.cpp
    M clang/lib/Sema/SemaStmt.cpp
    M clang/lib/Sema/SemaStmtAttr.cpp
    M clang/lib/Sema/SemaTemplateVariadic.cpp
    M clang/lib/Sema/TreeTransform.h
    M clang/lib/Serialization/ASTReaderStmt.cpp
    M clang/lib/Serialization/ASTWriterStmt.cpp
    M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
    M clang/test/AST/ByteCode/literals.cpp
    M clang/test/AST/ast-dump-recovery.c
    M clang/test/AST/ast-dump-recovery.cpp
    R clang/test/AST/ast-dump-recovery.m
    M clang/test/CXX/drs/cwg1xx.cpp
    M clang/test/CXX/drs/cwg26xx.cpp
    M clang/test/CXX/module/basic/basic.link/p2.cppm
    R clang/test/FixIt/typo.cpp
    R clang/test/Index/complete-switch.c
    M clang/test/Index/fix-its.c
    M clang/test/Lexer/raw-string-ext.c
    M clang/test/Modules/diagnose-missing-import.m
    M clang/test/OpenMP/begin_declare_variant_messages.c
    M clang/test/OpenMP/declare_reduction_messages.cpp
    M clang/test/OpenMP/declare_variant_messages.c
    M clang/test/OpenMP/declare_variant_messages.cpp
    M clang/test/OpenMP/target_update_messages.cpp
    M clang/test/Parser/cxx1z-decomposition.cpp
    M clang/test/Parser/cxx1z-fold-expressions.cpp
    M clang/test/Parser/cxx2c-pack-indexing.cpp
    M clang/test/Parser/objc-foreach-syntax.m
    M clang/test/Parser/opencl-atomics-cl20.cl
    M clang/test/Parser/recovery.c
    M clang/test/Parser/switch-recovery.cpp
    M clang/test/Parser/switch-typo-correction.cpp
    M clang/test/ParserOpenACC/parse-cache-construct.cpp
    M clang/test/ParserOpenACC/parse-clauses.c
    M clang/test/ParserOpenACC/parse-constructs.cpp
    M clang/test/ParserOpenACC/parse-wait-clause.c
    M clang/test/ParserOpenACC/parse-wait-construct.c
    M clang/test/Sema/PR28181.c
    M clang/test/Sema/builtin-unary-fp.c
    A clang/test/Sema/c23-delayed-typo-correction-crashes.c
    A clang/test/Sema/delayed-typo-correction-crashes.c
    M clang/test/Sema/invalid-member.cpp
    M clang/test/Sema/typo-correction-ambiguity.cpp
    M clang/test/Sema/typo-correction-no-hang.c
    M clang/test/Sema/typo-correction-no-hang.cpp
    M clang/test/Sema/typo-correction-recursive.cpp
    M clang/test/Sema/typo-correction.c
    M clang/test/SemaCXX/arrow-operator.cpp
    M clang/test/SemaCXX/constant-expression-cxx11.cpp
    M clang/test/SemaCXX/conversion-function.cpp
    M clang/test/SemaCXX/coroutines.cpp
    A clang/test/SemaCXX/cxx-delayed-typo-correction-crashes.cpp
    M clang/test/SemaCXX/cxx1z-decomposition.cpp
    A clang/test/SemaCXX/cxx20-delayed-typo-correction-crashes.cpp
    M clang/test/SemaCXX/cxx2a-adl-only-template-id.cpp
    M clang/test/SemaCXX/destructor.cpp
    M clang/test/SemaCXX/invalid-if-constexpr.cpp
    M clang/test/SemaCXX/member-expr.cpp
    M clang/test/SemaCXX/nested-name-spec.cpp
    R clang/test/SemaCXX/pr13394-crash-on-invalid.cpp
    M clang/test/SemaCXX/return.cpp
    M clang/test/SemaCXX/typo-correction-crash.cpp
    M clang/test/SemaCXX/typo-correction-cxx11.cpp
    R clang/test/SemaCXX/typo-correction-delayed.cpp
    M clang/test/SemaCXX/typo-correction.cpp
    M clang/test/SemaCXX/virtuals.cpp
    M clang/test/SemaObjC/call-super-2.m
    M clang/test/SemaObjC/typo-correction-subscript.m
    M clang/test/SemaObjC/undef-arg-super-method-call.m
    M clang/test/SemaObjCXX/block-for-lambda-conversion.mm
    M clang/test/SemaOpenACC/compute-construct-num_gangs-clause.cpp
    M clang/test/SemaOpenCL/atomic-ops.cl
    M clang/test/SemaOpenCL/clang-builtin-version.cl
    M clang/test/SemaTemplate/concepts-recovery-expr.cpp
    M clang/test/SemaTemplate/concepts.cpp
    M clang/test/SemaTemplate/typo-variadic.cpp
    M clang/tools/libclang/CXCursor.cpp
    M clang/unittests/Sema/ExternalSemaSourceTest.cpp

  Log Message:
  -----------
  Remove delayed typo expressions (#143423)

This removes the delayed typo correction functionality from Clang
(regular typo correction still remains) due to fragility of the
solution.

An RFC was posted here:
https://discourse.llvm.org/t/rfc-removing-support-for-delayed-typo-correction/86631
and while that RFC was asking for folks to consider stepping up to be
maintainers, and we did have a few new contributors show some interest,
experiments show that it's likely worth it to remove this functionality
entirely and focus efforts on improving regular typo correction.

This removal fixes ~20 open issues (quite possibly more), improves
compile time performance by roughly .3-.4%
(https://llvm-compile-time-tracker.com/?config=Overview&stat=instructions%3Au&remote=AaronBallman&sortBy=date),
and does not appear to regress diagnostic behavior in a way we wouldn't
find acceptable.

Fixes #142457
Fixes #139913
Fixes #138850
Fixes #137867
Fixes #137860
Fixes #107840
Fixes #93308
Fixes #69470
Fixes #59391
Fixes #58172
Fixes #46215
Fixes #45915
Fixes #45891
Fixes #44490
Fixes #36703
Fixes #32903
Fixes #23312
Fixes #69874



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list