-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang][Interp] Fix rotate builtins with differently-typed arguments
We were assuming (and asserting) that both arguments have the same type, but at least for the ms versions, that's not always the case.
- Loading branch information
Showing
2 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: %clang_cc1 -verify=ref,both %s -fms-extensions | ||
// RUN: %clang_cc1 -verify=expected,both %s -fexperimental-new-constant-interpreter -fms-extensions | ||
|
||
// ref-no-diagnostics | ||
// expected-no-diagnostics | ||
|
||
/// Used to assert because the two parameters to _rotl do not have the same type. | ||
static_assert(_rotl(0x01, 5) == 32); |