[all-commits] [llvm/llvm-project] 9d9046: [clang] Do not crash after suggesting typo correct...

Mariya Podchishchaeva via All-commits all-commits at lists.llvm.org
Mon Apr 17 05:36:39 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d9046f06d55692c5be51164694a4959d9e212b2
      https://github.com/llvm/llvm-project/commit/9d9046f06d55692c5be51164694a4959d9e212b2
  Author: Mariya Podchishchaeva <mariya.podchishchaeva at intel.com>
  Date:   2023-04-17 (Mon, 17 Apr 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Sema/Sema.h
    A clang/test/SemaCXX/invalid-if-constexpr.cpp

  Log Message:
  -----------
  [clang] Do not crash after suggesting typo correction to constexpr if condition

In some cases non-null non-constant yet valid expression may reach point where
`ConditionResult` is created. For example, typo correction mechanism can return
such expression, so double check before evaluating it.

Fixes https://github.com/llvm/llvm-project/issues/61885

Reviewed By: tbaeder, aaron.ballman

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




More information about the All-commits mailing list