brintos

brintos / llvm-project-archived public Read only

0
0
Text · 674 B · 727616f Raw
19 lines · c
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: echo 'struct a;' > %t/a.h4// RUN: echo 'struct b {}; void foo(struct b*);' > %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 -fmodule-map-file=%t/x.modulemap %s -I%t -verify7 8#include "a.h"9 10void f(struct a *p);11 12// FIXME: We should warn that 'b' will not be visible outside of this function,13// but we merge this 'b' with X.b's 'b' because we don't yet implement C's14// "compatible types" rule.15void g(struct b *p);16 17struct b b; // expected-error {{'b' must be defined before it is used}}18// expected-note@b.h:1 {{here}}19