brintos

brintos / llvm-project-archived public Read only

0
0
Text · 834 B · dca520e Raw
26 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: echo 'struct tm;' > %t/a.h4// RUN: echo 'struct X {}; void foo(struct tm*);' > %t/b.h5// RUN: echo 'module X { module a { header "a.h" } module b { header "b.h" } }' > %t/x.modulemap6// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -fmodule-map-file=%t/x.modulemap %s -I%t -verify -std=c++117// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x c++ -fmodule-map-file=%t/x.modulemap %s -I%t -verify -fmodules-local-submodule-visibility -std=c++118 9#include "a.h"10 11using ::tm;12 13struct A {14  // This use of 'struct X' makes the declaration (but not definition) of X visible.15  virtual void f(struct X *p);16};17 18namespace N {19  struct B : A {20    void f(struct X *q) override;21  };22}23 24X x; // expected-error {{'X' must be defined before it is used}}25// expected-note@b.h:1 {{here}}26