Clang Project

clang_source_code/test/Modules/using-decl-redecl.cpp
1// RUN: rm -rf %t
2// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t \
3// RUN:            -fmodule-map-file=%S/Inputs/using-decl-redecl/module.modulemap \
4// RUN:            -I%S/Inputs/using-decl-redecl \
5// RUN:            -Wno-modules-ambiguous-internal-linkage \
6// RUN:            -verify %s
7
8#include "d.h"
9
10const int n = 0;
11namespace M { using ::n; }
12
13#include "c.h"
14
15N::clstring y = b;
16
17// Use a typo to trigger import of all declarations in N.
18N::clstrinh s; // expected-error {{did you mean 'clstring'}}
19// expected-note@a.h:3 {{here}}
20
21namespace M { using N::n; }
22