| 1 |
// Checks for reachability for C++11 enum class properly |
| 2 |
// |
| 3 |
// RUN: rm -rf %t |
| 4 |
// RUN: mkdir -p %t |
| 5 |
// RUN: split-file %s %t |
| 6 |
// |
| 7 |
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm |
| 8 |
// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only |
| 9 |
// |
| 10 |
// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm |
| 11 |
// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only |
| 12 |
|
| 13 |
//--- foo.h |
| 14 |
enum class foo { |
| 15 |
a, b, c |
| 16 |
}; |
| 17 |
|
| 18 |
//--- A.cppm |
| 19 |
module; |
| 20 |
#include "foo.h" |
| 21 |
export module A; |
| 22 |
export foo func(); |
| 23 |
|
| 24 |
//--- Use.cpp |
| 25 |
// expected-no-diagnostics |
| 26 |
import A; |
| 27 |
void bar() { |
| 28 |
auto f = func(); |
| 29 |
} |