| 1 |
// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_BEFORE |
| 2 |
// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_AFTER |
| 3 |
// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_AFTER_USE |
| 4 |
// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s -DUSE_PRAGMA_SAME_FILE |
| 5 |
// RUN: %clang_cc1 -fms-extensions -fsyntax-only -verify -triple arm64-windows -isystem %S/Inputs %s |
| 6 |
|
| 7 |
#if defined(USE_PRAGMA_BEFORE) || defined(USE_PRAGMA_AFTER) || defined(USE_PRAGMA_SAME_FILE) |
| 8 |
// expected-no-diagnostics |
| 9 |
#else |
| 10 |
// 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 |
#endif |
| 13 |
#include <builtin-system-header.h> |
| 14 |
|
| 15 |
#ifdef USE_PRAGMA_SAME_FILE |
| 16 |
#pragma intrinsic(_InterlockedOr64) |
| 17 |
#endif |
| 18 |
|
| 19 |
void foo() { |
| 20 |
MACRO(0,0); |
| 21 |
} |
| 22 |
|
| 23 |
#ifdef USE_PRAGMA_AFTER_USE |
| 24 |
#pragma intrinsic(_InterlockedOr64) |
| 25 |
#endif |