aboutsummaryrefslogtreecommitdiff
path: root/clang/test/Modules/include-after-imports-enums.cppm
blob: 00affd98e299f8c090072cc88e214e2c8127fd53 (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
// RUN: rm -rf %t
// RUN: mkdir -p %t
// RUN: split-file %s %t
//
// RUN: %clang_cc1 -std=c++20 %t/M.cppm -emit-module-interface -o %t/M.pcm
// RUN: %clang_cc1 -std=c++20 %t/use.cpp -fprebuilt-module-path=%t -verify -fsyntax-only
//
// RUN: %clang_cc1 -std=c++20 %t/M.cppm -emit-reduced-module-interface -o %t/M.pcm
// RUN: %clang_cc1 -std=c++20 %t/use.cpp -fprebuilt-module-path=%t -verify -fsyntax-only

//--- enum.h
enum E { Value };

//--- M.cppm
module;
#include "enum.h"
export module M;
auto e = Value;

//--- use.cpp
// expected-no-diagnostics
import M;
#include "enum.h"

auto e = Value;