view clang/test/Analysis/std-c-library-functions-lookup.cpp @ 266:00f31e85ec16 default tip

Added tag current for changeset 31d058e83c98
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 14 Oct 2023 10:13:55 +0900
parents 1f2b6ac9f198
children
line wrap: on
line source

// RUN: %clang_analyze_cc1 %s \
// RUN:   -analyzer-checker=core \
// RUN:   -analyzer-checker=alpha.unix.StdCLibraryFunctions \
// RUN:   -analyzer-config alpha.unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \
// RUN:   -analyzer-checker=debug.ExprInspection \
// RUN:   -analyzer-config eagerly-assume=false \
// RUN:   -triple i686-unknown-linux 2>&1 | FileCheck %s

//      CHECK: Loaded summary for: size_t fread(void *, size_t, size_t, FILE *)
//  CHECK-NOT: Loaded summary for: size_t fread(void *, size_t, size_t, MyFile *)

typedef unsigned int size_t;
typedef struct FILE FILE;
size_t fread(void *, size_t, size_t, FILE *);

struct MyFile;
size_t fread(void *, size_t, size_t, MyFile *);

// Must have at least one call expression to initialize the summary map.
int bar(void);
void foo() {
  bar();
}