[all-commits] [llvm/llvm-project] 16ca71: [clang] Fix a typo-correction crash

Haojian Wu via All-commits all-commits at lists.llvm.org
Tue Sep 22 11:21:52 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 16ca711803300bd966acf8759876a1ccd478c616
      https://github.com/llvm/llvm-project/commit/16ca711803300bd966acf8759876a1ccd478c616
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2020-09-22 (Tue, 22 Sep 2020)

  Changed paths:
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaCXX/typo-correction-crash.cpp

  Log Message:
  -----------
  [clang] Fix a typo-correction crash

We leave a dangling TypoExpr when typo-correction is performed
successfully in `checkArgsForPlaceholders`, which leads a crash in the
later TypoCorrection.

This code was added in https://github.com/llvm/llvm-project/commit/1586782767938df3a20f7abc4d8335c48b100bc4,
and it didn't seem to have enough test coverage.
The fix is to remove this part, and no failuer tests.

Reviewed By: rsmith

Differential Revision: https://reviews.llvm.org/D87815




More information about the All-commits mailing list