Richard Smith | 826711d | 2015-07-29 23:38:25 +0000 | [diff] [blame] | 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 \ |
Richard Smith | 2de44e6 | 2016-01-12 20:34:32 +0000 | [diff] [blame] | 5 | // RUN: -Wno-modules-ambiguous-internal-linkage \ |
Richard Smith | 826711d | 2015-07-29 23:38:25 +0000 | [diff] [blame] | 6 | // RUN: -verify %s |
Richard Smith | 2de44e6 | 2016-01-12 20:34:32 +0000 | [diff] [blame] | 7 | |
| 8 | #include "d.h" |
| 9 | |
| 10 | const int n = 0; |
| 11 | namespace M { using ::n; } |
| 12 | |
Richard Smith | 826711d | 2015-07-29 23:38:25 +0000 | [diff] [blame] | 13 | #include "c.h" |
Richard Smith | 2de44e6 | 2016-01-12 20:34:32 +0000 | [diff] [blame] | 14 | |
Richard Smith | 826711d | 2015-07-29 23:38:25 +0000 | [diff] [blame] | 15 | N::clstring y = b; |
| 16 | |
| 17 | // Use a typo to trigger import of all declarations in N. |
| 18 | N::clstrinh s; // expected-error {{did you mean 'clstring'}} |
Richard Smith | 2de44e6 | 2016-01-12 20:34:32 +0000 | [diff] [blame] | 19 | // expected-note@a.h:3 {{here}} |
| 20 | |
| 21 | namespace M { using N::n; } |