12 lines · c
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: echo 'int foo = 0;' > %t/a.h4// RUN: echo 'module A { header "a.h" }' > %t/m.modulemap5// RUN: %clang_cc1 -fmodules -emit-module -fmodule-name=A -x c %t/m.modulemap -o %t/m.pcm6// RUN: echo 'int bar;' > %t/a.h7// RUN: not %clang_cc1 -fmodules -fmodule-file=%t/m.pcm -fmodule-map-file=%t/m.modulemap -x c %s -I%t -fsyntax-only 2>&1 | FileCheck %s8#include "a.h"9int foo = 0; // redefinition of 'foo'10// CHECK: fatal error: file {{.*}} has been modified since the module file {{.*}} was built11// CHECK: note: please rebuild precompiled file12