26 lines · c
1// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_BEFORE2// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_AFTER3// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_AFTER_USE4// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_SAME_FILE5// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s6 7#if defined(USE_PRAGMA_BEFORE) || defined(USE_PRAGMA_AFTER) || defined(USE_PRAGMA_SAME_FILE)8// expected-no-diagnostics9#else10// expected-error@+10 {{call to undeclared library function '_InterlockedOr64'}}11// expected-note@+9 {{include the header <intrin.h> or explicitly provide a declaration for '_InterlockedOr64'}}12#endif13#include <builtin-system-header.h>14 15#ifdef USE_PRAGMA_SAME_FILE16#pragma intrinsic(_InterlockedOr64)17#endif18 19void foo() {20 MACRO(0,0);21}22 23#ifdef USE_PRAGMA_AFTER_USE24#pragma intrinsic(_InterlockedOr64)25#endif26