brintos

brintos / llvm-project-archived public Read only

0
0
Text · 914 B · 90c5779 Raw
47 lines · plain
1// Fixes #1654452 3// RUN: rm -rf %t4// RUN: mkdir -p %t5// RUN: split-file %s %t6//7// RUN: %clang_cc1 -std=c++20 -x c++-user-header %t/header.h \8// RUN:   -emit-header-unit -o %t/header.pcm9//10// RUN: %clang_cc1 -std=c++20 %t/A.cppm -fmodule-file=%t/header.pcm \11// RUN:   -emit-module-interface -o %t/A.pcm12// 13// RUN: %clang_cc1 -std=c++20 %t/B.cppm -fmodule-file=%t/header.pcm \14// RUN:   -emit-module-interface -o %t/B.pcm15//16// RUN: %clang_cc1 -std=c++20 %t/use.cpp \17// RUN:   -fmodule-file=A=%t/A.pcm -fmodule-file=B=%t/B.pcm  \18// RUN:   -fmodule-file=%t/header.pcm \19// RUN:   -verify -fsyntax-only20 21//--- enum.h22enum E { Value };23 24//--- header.h25#include "enum.h"26 27//--- A.cppm28module;29#include "enum.h"30export module A;31 32auto e = Value;33 34//--- B.cppm35export module B;36import "header.h";37 38auto e = Value;39 40//--- use.cpp41// expected-no-diagnostics42import A;43import B;44#include "enum.h"45 46auto e = Value;47