brintos

brintos / llvm-project-archived public Read only

0
0
Text · 644 B · 750a6f1 Raw
52 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4 5// RUN: %clang_cc1 -fsyntax-only -fmodules -fmodules-cache-path=%t -fmodule-map-file=%t/module.modulemap  %t/test.cppm -I%t6//7 8//--- test.cppm9#pragma clang module import Baz10 11//--- Foo.h12#pragma once13class foo {14  char dummy = 1;15 16public:17  static foo var;18 19};20 21inline foo foo::var;22 23//--- Bar.h24#pragma once25#include <Foo.h>26 27void bar() {28  (void) foo::var;29}30 31//--- Baz.h32#pragma once33#include <Foo.h>34 35void baz() {36  (void) foo::var;37}38 39#include <Bar.h>40 41//--- module.modulemap42module Foo {43  header "Foo.h"44}45module Bar {46  header "Bar.h"47}48module Baz {49  header "Baz.h"50}51 52