22 lines · c
1// RUN: %clang_cc1 -E -x c %s | FileCheck %s2// RUN: %clang_cc1 -x c -fsyntax-only %s -verify3// RUN: %clang_cc1 -x cpp-output -fsyntax-only -verify %s4// expected-no-diagnostics5 6// The preprocessor does not expand macro-identifiers in #pragma directives.7// When we preprocess & parse the code, clang expands the macros in directives.8// When we parse already preprocessed code, clang still has to expand the9// macros in the directives.10// This means that we're not always able to parse the preprocessor's output11// without preserving the definitions (-dD).12 13#define FACTOR 414 15void foo() {16 // CHECK: #pragma unroll FACTOR17 #pragma unroll FACTOR18 for(;;) {19 }20 return;21}22