
There is a follow-up commit for #90319. The Windows test was disabled in that commit, but it should pass on this operating system. Therefore, it would be beneficial to have it enabled for MS Windows.
34 lines
630 B
C++
34 lines
630 B
C++
// RUN: rm -rf %t
|
|
// RUN: split-file %s %t
|
|
// RUN: cd %t
|
|
//
|
|
// RUN: cp a1.h a.h
|
|
// RUN: %clang_cc1 -fmodules -fvalidate-ast-input-files-content -fno-pch-timestamp -fmodule-map-file=module.modulemap -fmodules-cache-path=%t test1.cpp
|
|
// RUN: cp a2.h a.h
|
|
// RUN: %clang_cc1 -fmodules -fvalidate-ast-input-files-content -fno-pch-timestamp -fmodule-map-file=module.modulemap -fmodules-cache-path=%t test2.cpp
|
|
|
|
//--- a1.h
|
|
#define FOO
|
|
|
|
//--- a2.h
|
|
#define BAR
|
|
|
|
//--- module.modulemap
|
|
module a {
|
|
header "a.h"
|
|
}
|
|
|
|
//--- test1.cpp
|
|
#include "a.h"
|
|
|
|
#ifndef FOO
|
|
#error foo
|
|
#endif
|
|
|
|
//--- test2.cpp
|
|
#include "a.h"
|
|
|
|
#ifndef BAR
|
|
#error bar
|
|
#endif
|