diff --git a/libcxx/test/extensions/clang/thread/thread.mutex/lock.verify.cpp b/libcxx/test/extensions/clang/thread/thread.mutex/lock.verify.cpp index c83a87d4901c3..51ffa6962ac83 100644 --- a/libcxx/test/extensions/clang/thread/thread.mutex/lock.verify.cpp +++ b/libcxx/test/extensions/clang/thread/thread.mutex/lock.verify.cpp @@ -31,7 +31,7 @@ void f1() { } // expected-warning {{mutex 'm0' is still held at the end of function}} \ expected-warning {{mutex 'm1' is still held at the end of function}} -#if TEST_STD_VER >= 11 && TEST_CLANG_VER >= 2101 +#if TEST_STD_VER >= 11 && defined(TEST_CLANG_VER) && TEST_CLANG_VER >= 2101 void f2() { std::lock(m0, m1, m2); } // expected-warning {{mutex 'm0' is still held at the end of function}} \