File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: rm -rf %t
2
+ // RUN: split-file %s %t
3
+ // RUN: cd %t
4
+ //
5
+ // RUN: %clang_cc1 -std=c++20 -I %t %t/A.cppm -emit-module-interface -o %t/A.pcm -verify
6
+ // RUN: %clang_cc1 -std=c++20 -I %t %t/B.cpp -fmodule-file=A=%t/A.pcm -fsyntax-only -verify -ast-dump-all -ast-dump-filter baz | FileCheck %s
7
+
8
+ // --- foo.h
9
+ namespace baz {
10
+ using foo = char ;
11
+ using baz::foo;
12
+ }
13
+
14
+ // --- A.cppm
15
+ // expected-no-diagnostics
16
+ module ;
17
+ #include " foo.h"
18
+ export module A;
19
+
20
+ // --- B.cpp
21
+ // expected-no-diagnostics
22
+ #include " foo.h"
23
+ import A;
24
+ // Since modules are loaded lazily, force loading by performing a lookup.
25
+ using xxx = baz::foo;
26
+
27
+ // CHECK-LABEL: Dumping baz:
28
+ // CHECK-NEXT: NamespaceDecl 0x[[BAZ_REDECL_ADDR:[^ ]*]] prev 0x[[BAZ_ADDR:[^ ]*]]
29
+ // CHECK: TypeAliasDecl 0x[[ALIAS_REDECL_ADDR:[^ ]*]] prev 0x[[ALIAS_ADDR:[^ ]*]]
30
+ // FIXME: UsingShadowDecl should have been merged
31
+ // CHECK: UsingShadowDecl 0x{{[^ ]*}} <{{.*}}> col:{{.*}} imported in A.<global> hidden implicit TypeAlias 0x[[ALIAS_REDECL_ADDR]] 'foo'
32
+
33
+ // CHECK-LABEL: Dumping baz:
34
+ // CHECK-NEXT: NamespaceDecl 0x[[BAZ_ADDR]] <{{.*}}> line:{{.*}} baz
35
+ // CHECK: UsingShadowDecl 0x[[SHADOW_ADDR:[^ ]*]] <{{.*}}> col:{{.*}} implicit TypeAlias 0x[[ALIAS_ADDR]] 'foo'
You can’t perform that action at this time.
0 commit comments