brintos

brintos / llvm-project-archived public Read only

0
0
Text · 981 B · 5338fa0 Raw
23 lines · c
1// RUN: %clang_analyze_cc1 %s \2// RUN:   -analyzer-checker=core \3// RUN:   -analyzer-checker=unix.StdCLibraryFunctions \4// RUN:   -analyzer-config unix.StdCLibraryFunctions:ModelPOSIX=true \5// RUN:   -analyzer-config unix.StdCLibraryFunctions:DisplayLoadedSummaries=true \6// RUN:   -analyzer-checker=debug.ExprInspection \7// RUN:   -analyzer-config eagerly-assume=false \8// RUN:   -triple i686-unknown-linux 2>&1 | FileCheck %s --allow-empty9 10// We test here the implementation of our summary API with Optional types. In11// this TU we do not provide declaration for any of the functions that have12// summaries. The implementation should be able to handle the nonexistent13// declarations in a way that the summary is not added to the map. We expect no14// crashes (i.e. no optionals should be 'dereferenced') and no output.15 16// Must have at least one call expression to initialize the summary map.17int bar(void);18void foo(void) {19  bar();20}21 22// CHECK-NOT: Loaded summary for:23