[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / SemaCXX / ifunc-has-attribute.cpp
blob242f3b621745f59136a419dfe9d863f280aa7012
1 // RUN: %clang_cc1 -emit-llvm-only -triple x86_64-linux-gnu -verify %s -DSUPPORTED=1
2 // RUN: %clang_cc1 -emit-llvm-only -triple x86_64-apple-macosx -verify %s -DSUPPORTED=1
3 // RUN: %clang_cc1 -emit-llvm-only -triple arm64-apple-macosx -verify %s -DSUPPORTED=1
4 // RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-win32 -verify %s -DNOT_SUPPORTED=1
6 // expected-no-diagnostics
8 #if __has_attribute(ifunc)
9 # if NOT_SUPPORTED
10 # error "ifunc appears to be supported on this platform, but shouldn't be"
11 # endif
12 #else
13 # if SUPPORTED
14 # error "ifunc should be supported on this platform, but isn't"
15 # endif
16 #endif