llvm-project
13 строк · 448.0 Байт
1// RUN: %clang_cc1 %s -emit-pch -o %t1.pch -DMACRO1=1
2// RUN: %clang_cc1 -fsyntax-only %s -include-pch %t1.pch -DMACRO2=1 2>&1 | FileCheck %s
3
4#ifndef HEADER
5#define HEADER
6#else
7#define MACRO1 2
8// CHECK: macro-cmdline.c{{.*}}'MACRO1' macro redefined
9// CHECK: <command line>{{.*}}previous definition is here
10#define MACRO2 2
11// CHECK: macro-cmdline.c{{.*}}'MACRO2' macro redefined
12// CHECK: <command line>{{.*}}previous definition is here
13#endif
14