brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 278c1c2 Raw
55 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -fprebuilt-module-path=%t -fsyntax-only -verify7 8// RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/a.cppm -o %t/a.pcm9// RUN: %clang_cc1 -std=c++20 %t/b.cppm -fprebuilt-module-path=%t -fsyntax-only -verify10 11//--- foo.h12 13namespace std14{15    template<class _Dom1>16    void operator &&(_Dom1 __v, _Dom1 __w)17    { 18        return;19    }20}21 22//--- bar.h23namespace std 24{25  template<typename... _Types>26    struct _Traits27    {28      static constexpr bool _S_copy_ctor =29   (__is_trivial(_Types) && ...);30    };31 32  template<typename... _Types>33    struct variant34    {35      void36      swap(variant& __rhs)37      noexcept((__is_trivial(_Types) && ...))38      {39      }40    };41}42 43//--- a.cppm44module;45#include "foo.h"46#include "bar.h"47export module a;48 49//--- b.cppm50// expected-no-diagnostics51module;52#include "bar.h"53export module b;54import a;55