[all-commits] [llvm/llvm-project] 874ca0: [Clang][ExprConstant] fix constant expression did ...

Zhikai Zeng via All-commits all-commits at lists.llvm.org
Sat Jul 6 01:28:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 874ca08645420413e525054a47caf039bebde28b
      https://github.com/llvm/llvm-project/commit/874ca08645420413e525054a47caf039bebde28b
  Author: Zhikai Zeng <backlight.zzk at gmail.com>
  Date:   2024-07-06 (Sat, 06 Jul 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/eval-crashes.cpp

  Log Message:
  -----------
  [Clang][ExprConstant] fix constant expression did not evaluate to integer (#97146)

fixes https://github.com/llvm/llvm-project/issues/96670

The cause is that we might return a lvalue here at


https://github.com/llvm/llvm-project/blob/3e53c97d33210db68188e731e93ee48dbaeeae32/clang/lib/AST/ExprConstant.cpp#L15861-L15865

This PR will make sure we return a rvalue in `FastEvaluateAsRValue`.



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