| 1 |
// RUN: %clang_analyze_cc1 -analyzer-checker=unix.StdCLibraryFunctions -verify %s |
| 2 |
// RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s |
| 3 |
// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s |
| 4 |
// RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s |
| 5 |
// RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s |
| 6 |
|
| 7 |
// This test tests crashes that occur when standard functions are available |
| 8 |
// for inlining. |
| 9 |
|
| 10 |
// expected-no-diagnostics |
| 11 |
|
| 12 |
int isdigit(int _) { return !0; } |
| 13 |
void test_redefined_isdigit(int x) { |
| 14 |
int (*func)(int) = isdigit; |
| 15 |
for (; func(x);) // no-crash |
| 16 |
; |
| 17 |
} |