blob: 72c25529b40f89ce4e173b3a65bcf5c11a83b3f7 [file] [log] [blame]
Douglas Gregord6a49bb2011-03-18 16:10:52 +00001// RUN: %clang_cc1 -fsyntax-only -Wheader-hygiene -verify %s
2
3#include "warn-using-namespace-in-header.h"
4
5namespace dont_warn {}
6using 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 Gregor9172aa62011-03-26 22:25:30 +000010
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}}
Nico Weber21669482011-04-02 19:45:15 +000028
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50// expected-warning {{using namespace directive in global context in header}}
51
52// |using namespace| through a macro shouldn't warn if the instantiation is in a
53// cc file.
54USING_MACRO