Skip to content

Commit

Permalink
[clang][Interp] Add missing static_assert messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tbaederr committed May 31, 2023
1 parent 3b3912e commit 722fc7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions clang/test/AST/Interp/depth-limit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ constexpr int f(int a) {
// expected-note {{in call to 'f(2)'}} \
// expected-note {{in call to 'f(1)'}}
}
static_assert(f(0) == 100); // ref-error {{not an integral constant expression}} \
// ref-note {{in call to 'f(0)'}} \
// expected-error {{not an integral constant expression}} \
// expected-note {{in call to 'f(0)'}}
static_assert(f(0) == 100, ""); // ref-error {{not an integral constant expression}} \
// ref-note {{in call to 'f(0)'}} \
// expected-error {{not an integral constant expression}} \
// expected-note {{in call to 'f(0)'}}
8 changes: 4 additions & 4 deletions clang/test/AST/Interp/depth-limit2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ constexpr int bar() {
// ref-note {{in call to 'foo()'}}
}

static_assert(bar() == 12); // expected-error {{not an integral constant expression}} \
// expected-note {{in call to 'bar()'}} \
// ref-error {{not an integral constant expression}} \
// ref-note {{in call to 'bar()'}}
static_assert(bar() == 12, ""); // expected-error {{not an integral constant expression}} \
// expected-note {{in call to 'bar()'}} \
// ref-error {{not an integral constant expression}} \
// ref-note {{in call to 'bar()'}}

0 comments on commit 722fc7e

Please sign in to comment.