blob: 4233a2f7f433840244a6bf75c92ff4dc1cd50db4 [file] [log] [blame]
// RUN: %clang_cc1 -std=c++23 -x c++ %s -fno-assumptions -verify
// RUN: %clang_cc1 -std=c++23 -x c++ %s -fms-compatibility -verify
// expected-no-diagnostics
// We don't check assumptions at compile time if '-fno-assumptions' is passed,
// or if we're in MSVCCompat mode
constexpr bool f(bool x) {
[[assume(x)]];
return true;
}
static_assert(f(false));