view clang/test/Analysis/std-c-library-functions-inlined.c @ 252:1f2b6ac9f198 llvm-original

LLVM16-1
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 18 Aug 2023 09:04:13 +0900 (2023-08-18)
parents 1d019706d866
children
line wrap: on
line source
// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s
// RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s
// RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s
// RUN: %clang_analyze_cc1 -triple armv7-a15-linux -analyzer-checker=alpha.unix.StdCLibraryFunctions -verify %s
// RUN: %clang_analyze_cc1 -triple thumbv7-a15-linux -analyzer-checker=alpha.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
    ;
}