llvm-project/clang/test/Modules/implicit-module-no-timestamp.cpp
Ivan Murashko 91c917b19f
[Modules] Enable MS Windows test for implicit-module-no-timestamp.cpp (#91738)
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.
2024-05-11 23:14:56 +01:00

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