[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / using-decl-redecl.cpp
blob0524052fce5b66db0d4a567e1f9d3bbc34c85cb1
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
8 #include "d.h"
10 const int n = 0;
11 namespace M { using ::n; }
13 #include "c.h"
15 N::clstring y = b;
17 // Use a typo to trigger import of all declarations in N.
18 N::clstrinh s; // expected-error {{did you mean 'clstring'}}
19 // expected-note@a.h:3 {{here}}
21 namespace M { using N::n; }