2010-07-03 15:57:53 +08:00
|
|
|
// Test this without pch.
|
|
|
|
// RUN: %clang_cc1 -include %S/cxx-namespaces.h -fsyntax-only -verify %s
|
|
|
|
|
|
|
|
// Test with pch.
|
|
|
|
// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-namespaces.h
|
2013-06-24 09:46:41 +08:00
|
|
|
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
|
|
|
|
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -ast-dump -ast-dump-lookups -ast-dump-filter N %s | FileCheck %s
|
|
|
|
|
|
|
|
// Test with modules.
|
|
|
|
// RUN: %clang_cc1 -fmodules -x c++-header -emit-pch -o %t %S/cxx-namespaces.h
|
|
|
|
// RUN: %clang_cc1 -fmodules -include-pch %t -fsyntax-only -verify %s
|
|
|
|
// RUN: %clang_cc1 -fmodules -include-pch %t -fsyntax-only -ast-dump -ast-dump-lookups -ast-dump-filter N %s | FileCheck %s
|
2010-07-03 15:57:53 +08:00
|
|
|
|
2012-10-19 20:44:48 +08:00
|
|
|
// expected-no-diagnostics
|
|
|
|
|
2010-07-03 15:57:53 +08:00
|
|
|
void m() {
|
|
|
|
N::x = 0;
|
2013-06-24 09:46:41 +08:00
|
|
|
N::f();
|
2010-07-03 15:57:53 +08:00
|
|
|
}
|
2013-06-24 09:46:41 +08:00
|
|
|
|
|
|
|
// namespace 'N' should contain only two declarations of 'f'.
|
|
|
|
|
|
|
|
// CHECK: DeclarationName 'f'
|
|
|
|
// CHECK-NEXT: |-Function {{.*}} 'f' 'void (
|
|
|
|
// CHECK-NEXT: `-Function {{.*}} 'f' 'void (
|