mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-17 08:21:13 +00:00
[Clang][NFC] Added testcase from #49549
The issue is fixed in trunk, so add testcase to avoid regression in the future.
This commit is contained in:
parent
85dae4c11e
commit
623b66eded
@ -159,4 +159,18 @@ constexpr int constexpr_function() {
|
||||
[[likely]] return 0;
|
||||
}
|
||||
static_assert(constexpr_function() == 0);
|
||||
|
||||
constexpr double pow(double x, long long n) noexcept {
|
||||
if (n > 0) [[likely]]
|
||||
return x * pow(x, n - 1);
|
||||
else [[unlikely]]
|
||||
return 1;
|
||||
}
|
||||
constexpr long long fact(long long n) noexcept {
|
||||
if (n > 1) [[likely]]
|
||||
return n * fact(n - 1);
|
||||
else [[unlikely]]
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user