Douglas Gregor | d6a49bb | 2011-03-18 16:10:52 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -Wheader-hygiene -verify %s |
| 2 | |
| 3 | #include "warn-using-namespace-in-header.h" |
| 4 | |
| 5 | namespace dont_warn {} |
| 6 | using namespace dont_warn; |
| 7 | |
| 8 | // Warning is actually in the header but only the cpp file gets scanned. |
| 9 | // expected-warning {{using namespace directive in global context in header}} |
Douglas Gregor | 9172aa6 | 2011-03-26 22:25:30 +0000 | [diff] [blame] | 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | // Warn inside linkage specs too. |
| 20 | // expected-warning {{using namespace directive in global context in header}} |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | // expected-warning {{using namespace directive in global context in header}} |