brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.8 KiB · b273fc3 Raw
144 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=hf -fno-cxx-modules -fmodules -fno-implicit-modules %t/CMO.cppmap -o %t/WI9.pcm6// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=g -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/WI9.pcm %t/E6H.cppmap -o %t/4BK.pcm7// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=r -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/WI9.pcm %t/HMT.cppmap -o %t/LUM.pcm8// RUN: %clang_cc1 -xc++ -std=c++20 -emit-module -fmodule-name=q -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/LUM.pcm -fmodule-file=%t/4BK.pcm %t/JOV.cppmap -o %t/9VX.pcm9// RUN: %clang_cc1 -xc++ -std=c++20 -verify -fsyntax-only -fno-cxx-modules -fmodules -fno-implicit-modules -fmodule-file=%t/9VX.pcm %t/XFD.cc10 11//--- 2OT.h12#include "LQ1.h"13 14namespace ciy {15namespace xqk {16template <typename>17class vum {18 public:19  using sc = std::C::wmd;20  friend bool operator==(vum, vum);21};22template <typename>23class me {24 public:25  using vbh = vum<me>;26  using sc = std::C::vy<vbh>::sc;27  template <typename db>28  operator db() { return {}; }29};30}  // namespace xqk31template <typename vus>32xqk::me<vus> uvo(std::C::wmd, vus);33}  // namespace ciy34 35class ua {36  std::C::wmd kij() {37    ciy::uvo(kij(), '-');38    return {};39  }40};41 42//--- 9KF.h43#include "LQ1.h"44#include "2OT.h"45namespace {46void al(std::C::wmd lou) { std::C::jv<std::C::wmd> yt = ciy::uvo(lou, '/'); }47}  // namespace48 49//--- CMO.cppmap50module "hf" {51header "LQ1.h"52}53 54 55//--- E6H.cppmap56module "g" {57export *58header "2OT.h"59}60 61 62//--- HMT.cppmap63module "r" {64header "2OT.h"65}66 67 68//--- JOV.cppmap69module "q" {70header "9KF.h"71}72 73 74//--- LQ1.h75namespace std {76namespace C {77template <class zd>78struct vy : zd {};79template <class ub>80struct vy<ub*> {81  typedef ub jz;82};83struct wmd {};84template <class uo, class zt>85void sk(uo k, zt gf) {86  (void)(k != gf);87}88template <class uo>89class fm {90 public:91  fm(uo);92};93template <class kj, class kju>94bool operator==(kj, kju);95template <class epn>96void afm(epn) {97  using yp = vy<epn>;98  if (__is_trivially_copyable(yp)) {99    sk(fm(epn()), nullptr);100  }101}102template <class ub>103class jv {104 public:105  constexpr void gq();106  ub *nef;107};108template <class ub>109constexpr void jv<ub>::gq() {110    afm(nef);111}112}  // namespace C113}  // namespace std114namespace ciy {115}  // namespace ciy116 117//--- XFD.cc118// expected-no-diagnostics119#include "LQ1.h"120#include "2OT.h"121class wiy {122 public:123  std::C::wmd eyb();124};125template <typename wpa>126void i(wpa fg) {127  std::C::jv<std::C::wmd> zs;128  zs = ciy::uvo(fg.eyb(), '\n');129}130namespace ciy {131namespace xqk {132struct sbv;133std::C::jv<sbv> ns() {134  std::C::jv<sbv> ubs;135  ubs.gq();136  return ubs;137}138}  // namespace xqk139}  // namespace ciy140void s() {141  wiy fg;142  i(fg);143}144