summaryrefslogtreecommitdiffstats
path: root/test/Modules/using-decl-redecl.cpp
blob: 0524052fce5b66db0d4a567e1f9d3bbc34c85cb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t \
// RUN:            -fmodule-map-file=%S/Inputs/using-decl-redecl/module.modulemap \
// RUN:            -I%S/Inputs/using-decl-redecl \
// RUN:            -Wno-modules-ambiguous-internal-linkage \
// RUN:            -verify %s

#include "d.h"

const int n = 0;
namespace M { using ::n; }

#include "c.h"

N::clstring y = b;

// Use a typo to trigger import of all declarations in N.
N::clstrinh s; // expected-error {{did you mean 'clstring'}}
// expected-note@a.h:3 {{here}}

namespace M { using N::n; }