[all-commits] [llvm/llvm-project] a4edc2: Constexpr evaluator should treat [[gnu::weak]] mem...

Takuya Shimizu via All-commits all-commits at lists.llvm.org
Mon Apr 17 06:51:16 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4edc2c9fa35a763fc5f4c9cf6383096a13a9cf6
      https://github.com/llvm/llvm-project/commit/a4edc2c9fa35a763fc5f4c9cf6383096a13a9cf6
  Author: Takuya Shimizu <shimizu2486 at gmail.com>
  Date:   2023-04-17 (Mon, 17 Apr 2023)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/ExprConstant.cpp
    A clang/test/SemaCXX/crash-lambda-weak-attr.cpp

  Log Message:
  -----------
  Constexpr evaluator should treat [[gnu::weak]] member pointer comparisons as evaluation failure

This patch fixes the wrong signal from the constexpr evaluator that
[[gnu::weak]] member pointer comparison is valid, while it is emitting
notes on them.

I found a crashing case fixed by this change and added it as a test
case: https://godbolt.org/z/8391fGjGn

I noticed this while I was working on D146358.

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




More information about the All-commits mailing list