brintos

brintos / llvm-project-archived public Read only

0
0
Text · 673 B · 992eb9d Raw
30 lines · plain
1// Checks for reachability for C++11 enum class properly2//3// RUN: rm -rf %t4// RUN: mkdir -p %t5// RUN: split-file %s %t6//7// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm8// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only9//10// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-reduced-module-interface -o %t/A.pcm11// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -verify -fsyntax-only12 13//--- foo.h14enum class foo {15    a, b, c16};17 18//--- A.cppm19module;20#include "foo.h"21export module A;22export foo func();23 24//--- Use.cpp25// expected-no-diagnostics26import A;27void bar() {28    auto f = func();29}30