[Clang/AMDGPU] Zero sized arrays not allowed in HIP device code. (#113470)
[llvm-project.git] / clang / test / Analysis / pch_crash.cpp
blob7ad2cb2d2ab579bf5a290276b9ebbd3a1ee4a00e
1 // RUN: %clang_cc1 -triple x86_64-apple-macosx10.15.0 -emit-pch -o %t %s
2 // RUN: %clang_analyze_cc1 -triple x86_64-apple-macosx10.15.0 -include-pch %t \
3 // RUN: -analyzer-checker=core,apiModeling -verify %s
4 //
5 // RUN: %clang_cc1 -emit-pch -o %t %s
6 // RUN: %clang_analyze_cc1 -include-pch %t \
7 // RUN: -analyzer-checker=core,apiModeling -verify %s
9 // expected-no-diagnostics
11 #ifndef HEADER
12 #define HEADER
13 // Pre-compiled header
15 int foo();
17 // Literal data for this macro value will be null
18 #define EOF -1
20 #else
21 // Source file
23 int test() {
24 // we need a function call here to initiate erroneous routine
25 return foo(); // no-crash
28 #endif