[all-commits] [llvm/llvm-project] 94d36f: Fix a crash on invalid with _Generic expressions

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed May 4 09:42:15 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 94d36fdbd7d2c6eab250f15f65fd20a6447b92eb
      https://github.com/llvm/llvm-project/commit/94d36fdbd7d2c6eab250f15f65fd20a6447b92eb
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-05-04 (Wed, 04 May 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/Sema/generic-selection.c

  Log Message:
  -----------
  Fix a crash on invalid with _Generic expressions

We were failing to check if the controlling expression is dependent or
not when testing whether it has side effects. This would trigger an
assertion. Instead, if the controlling expression is dependent, we
suppress the check and diagnostic.

This fixes Issue 50227.




More information about the All-commits mailing list