brintos

brintos / llvm-project-archived public Read only

0
0
Text · 559 B · 7cc3be6 Raw
32 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/repro.cppm -fdeclspec -emit-module-interface -o %t/repro.pcm6// RUN: %clang_cc1 -std=c++20 %t/source.cpp -fdeclspec -fsyntax-only -verify -fprebuilt-module-path=%t7 8//--- repro_decl.hpp9#pragma once10 11extern "C"12{13    __declspec(selectany) int foo = 0;14}15 16//--- repro.cppm17module;18#include "repro_decl.hpp"19 20export module repro;21 22export inline int func()23{24    return foo;25}26 27//--- source.cpp28// expected-no-diagnostics29import repro;30 31#include "repro_decl.hpp"32