1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
2 | |
3 | // FIXME: We should probably suppress the warning on reopening an inline |
4 | // namespace without the inline keyword if it's not the first opening of the |
5 | // namespace in the file, because there's no risk of the inlineness differing |
6 | // across TUs in that case. |
7 | |
8 | namespace NIL {} // expected-note {{previous definition}} |
9 | inline namespace NIL {} // expected-error {{cannot be reopened as inline}} |
10 | inline namespace IL {} // expected-note {{previous definition}} |
11 | namespace IL {} // expected-warning{{inline namespace reopened as a non-inline namespace}} |
12 | |
13 | namespace {} // expected-note {{previous definition}} |
14 | inline namespace {} // expected-error {{cannot be reopened as inline}} |
15 | namespace X { |
16 | inline namespace {} // expected-note {{previous definition}} |
17 | namespace {} // expected-warning {{inline namespace reopened as a non-inline namespace}} |
18 | } |
19 | |