annotate clang/test/Analysis/std-c-library-functions-inlined.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_analyze_cc1 -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s
anatofuz
parents:
diff changeset
2 // RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s
anatofuz
parents:
diff changeset
3 // RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s
anatofuz
parents:
diff changeset
4 // RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s
anatofuz
parents:
diff changeset
5 // RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=apiModeling.StdCLibraryFunctions -verify %s
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 // This test tests crashes that occur when standard functions are available
anatofuz
parents:
diff changeset
8 // for inlining.
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 // expected-no-diagnostics
anatofuz
parents:
diff changeset
11
anatofuz
parents:
diff changeset
12 int isdigit(int _) { return !0; }
anatofuz
parents:
diff changeset
13 void test_redefined_isdigit(int x) {
anatofuz
parents:
diff changeset
14 int (*func)(int) = isdigit;
anatofuz
parents:
diff changeset
15 for (; func(x);) // no-crash
anatofuz
parents:
diff changeset
16 ;
anatofuz
parents:
diff changeset
17 }