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}} 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}} 28 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. 54 USING_MACRO 55