Debian Codegraph @

clang/test/Modules/pr73893.cppm

raw
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/foo.cppm -I%t -emit-module-interface -o %t/foo.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/use.cc -fmodule-file=foo=%t/foo.pcm -fsyntax-only -verify
7
8 //--- foo.h
9 namespace foo {
10
11 }
12
13 //--- foo.cppm
14 module;
15 #include "foo.h"
16 export module foo;
17
18 //--- use.cc
19 import foo;
20 void use() {
21 foo::bar(); // expected-error {{no member named 'bar' in namespace 'foo'}}
22 }