Artem Dergachev | f23ee51 | 2018-10-02 20:50:40 +0000 | [diff] [blame] | 1 | // RUN: %clang_analyze_cc1 -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s |
| 2 | // RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s |
| 3 | // RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s |
| 4 | // RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s |
| 5 | // RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s |
Artem Dergachev | 3463c9e | 2018-08-14 21:06:30 +0000 | [diff] [blame] | 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 | } |