Skip to content

Commit

Permalink
[analyzer] Fix broken testcase (#75216)
Browse files Browse the repository at this point in the history
When merging commit c873f77 I didn't
manually rebase it onto the tip of the main branch, so I didn't notice
that the testcase that's added by it needs to be tweaked to account for
the effects of commit 2f29ded (which
was also merged by me a few days ago).
  • Loading branch information
NagyDonat committed Dec 12, 2023
1 parent 935c6a2 commit 4b7d400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/test/Analysis/enum-cast-out-of-range.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ enum WidgetKind { A=1, B, C, X=99 }; // expected-note {{enum declared here}}
void foo() {
WidgetKind c = static_cast<WidgetKind>(3); // OK
WidgetKind x = static_cast<WidgetKind>(99); // OK
WidgetKind d = static_cast<WidgetKind>(4); // expected-warning {{The value provided to the cast expression is not in the valid range of values for 'WidgetKind'}}
WidgetKind d = static_cast<WidgetKind>(4); // expected-warning {{The value '4' provided to the cast expression is not in the valid range of values for 'WidgetKind'}}

ignore_unused(c, x, d);
}

0 comments on commit 4b7d400

Please sign in to comment.