14 lines · c
1// RUN: %clang_cc1 %s -emit-pch -o %t1.pch -DMACRO1=12// RUN: %clang_cc1 -fsyntax-only %s -include-pch %t1.pch -DMACRO2=1 2>&1 | FileCheck %s3 4#ifndef HEADER5#define HEADER6#else7#define MACRO1 28// CHECK: macro-cmdline.c{{.*}}'MACRO1' macro redefined9// CHECK: <command line>{{.*}}previous definition is here10#define MACRO2 211// CHECK: macro-cmdline.c{{.*}}'MACRO2' macro redefined12// CHECK: <command line>{{.*}}previous definition is here13#endif14