1 // RUN: %clang_analyze_cc1 -analyzer-checker=core,debug.ExprInspection -verify %s
3 typedef typeof(sizeof(int)) size_t;
4 size_t clang_analyzer_getExtent(const void *p
);
5 void clang_analyzer_dump(size_t n
);
7 extern const unsigned char extern_redecl
[];
8 const unsigned char extern_redecl
[] = { 1,2,3,4 };
9 const unsigned char tentative_redecl
[];
10 const unsigned char tentative_redecl
[] = { 1,2,3,4 };
12 const unsigned char direct_decl
[] = { 1,2,3,4 };
14 void test_redeclaration_extent(void) {
15 clang_analyzer_dump(clang_analyzer_getExtent(direct_decl
)); // expected-warning {{4 S64b}}
16 clang_analyzer_dump(clang_analyzer_getExtent(extern_redecl
)); // expected-warning {{4 S64b}}
17 clang_analyzer_dump(clang_analyzer_getExtent(tentative_redecl
)); // expected-warning {{4 S64b}}