[Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (#113470)
[llvm-project.git] / clang / test / PCH / cxx-namespaces.cpp
blobebbc387746eca1dbfd364268463a605131b2bf77
1 // Test this without pch.
2 // RUN: %clang_cc1 -include %S/cxx-namespaces.h -fsyntax-only -verify %s
4 // Test with pch.
5 // RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-namespaces.h
6 // RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s
7 // RUN: %clang_cc1 -include-pch %t -ast-dump-lookups -ast-dump-filter N %s | FileCheck %s
9 // Test with modules.
10 // RUN: %clang_cc1 -fmodules -x c++-header -emit-pch -o %t %S/cxx-namespaces.h
11 // RUN: %clang_cc1 -fmodules -include-pch %t -fsyntax-only -verify %s
12 // RUN: %clang_cc1 -fmodules -include-pch %t -ast-dump-lookups -ast-dump-filter N %s | FileCheck %s
14 // expected-no-diagnostics
16 void m() {
17 N::x = 0;
18 N::f();
21 // namespace 'N' should contain only two declarations of 'f'.
23 // CHECK: DeclarationName 'f'
24 // CHECK-NEXT: |-Function {{.*}} 'f' 'void (
25 // CHECK-NEXT: `-Function {{.*}} 'f' 'void (