mirror of https://github.com/microsoft/clang.git
[analyzer] Add a test forgotten in r339088.
Differential Revision: https://reviews.llvm.org/D50363 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9b02102c0e
commit
3463c9ea46
|
@ -0,0 +1,17 @@
|
|||
// RUN: %clang_analyze_cc1 -analyzer-checker=unix.StdCLibraryFunctions -verify %s
|
||||
// RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s
|
||||
// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s
|
||||
// RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s
|
||||
// RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s
|
||||
|
||||
// This test tests crashes that occur when standard functions are available
|
||||
// for inlining.
|
||||
|
||||
// expected-no-diagnostics
|
||||
|
||||
int isdigit(int _) { return !0; }
|
||||
void test_redefined_isdigit(int x) {
|
||||
int (*func)(int) = isdigit;
|
||||
for (; func(x);) // no-crash
|
||||
;
|
||||
}
|
Loading…
Reference in New Issue