Skip to content

Commit

Permalink
[clang][Interp][Test] Add test for llvm#97302
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed Jul 5, 2024
1 parent d6e5b14 commit 00c622e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clang/test/AST/Interp/records.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,12 @@ namespace DeclRefs {
constexpr B b;
static_assert(b.a.m == 100, "");
static_assert(b.a.f == 100, "");

constexpr B b2;
static_assert(b2.a.m == 100, "");
static_assert(b2.a.f == 100, "");
static_assert(b2.a.f == 101, ""); // both-error {{failed}} \
// both-note {{evaluates to '100 == 101'}}
}

namespace PointerArith {
Expand Down

0 comments on commit 00c622e

Please sign in to comment.