blob: d5389374c33c5d78083c0b733fd0328f8199f34a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// RUN: %clang_cc1 -E -x c %s | FileCheck %s
// RUN: %clang_cc1 -x c -fsyntax-only %s -verify
// RUN: %clang_cc1 -x cpp-output -fsyntax-only -verify %s
// expected-no-diagnostics
// The preprocessor does not expand macro-identifiers in #pragma directives.
// When we preprocess & parse the code, clang expands the macros in directives.
// When we parse already preprocessed code, clang still has to expand the
// macros in the directives.
// This means that we're not always able to parse the preprocessor's output
// without preserving the definitions (-dD).
#define FACTOR 4
void foo() {
// CHECK: #pragma unroll FACTOR
#pragma unroll FACTOR
for(;;) {
}
return;
}
|