[all-commits] [llvm/llvm-project] bdf6fb: PR49239: Don't take shortcuts when constant evalua...

Richard Smith via All-commits all-commits at lists.llvm.org
Thu Feb 18 18:31:36 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bdf6fbc939646b52af61c0bae7335623a8be59f4
      https://github.com/llvm/llvm-project/commit/bdf6fbc939646b52af61c0bae7335623a8be59f4
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2021-02-18 (Thu, 18 Feb 2021)

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/Sema/i-c-e.c

  Log Message:
  -----------
  PR49239: Don't take shortcuts when constant evaluating in 'warn on UB'
mode.

We use that mode when evaluating ICEs in C, and those shortcuts could
result in ICE evaluation producing the wrong answer, specifically if we
evaluate a statement-expression as part of evaluating the ICE.




More information about the All-commits mailing list