blob: 7cc3be6903e6ac93bb26b88e42af2899048f9855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/repro.cppm -fdeclspec -emit-module-interface -o %t/repro.pcm
// RUN: %clang_cc1 -std=c++20 %t/source.cpp -fdeclspec -fsyntax-only -verify -fprebuilt-module-path=%t
//--- repro_decl.hpp
#pragma once
extern "C"
{
__declspec(selectany) int foo = 0;
}
//--- repro.cppm
module;
#include "repro_decl.hpp"
export module repro;
export inline int func()
{
return foo;
}
//--- source.cpp
// expected-no-diagnostics
import repro;
#include "repro_decl.hpp"
|