blob: fe495642f21f432e885e164e136f23b2a3ca6a6b [file] [log] [blame]
Gabor Martona787a4e2020-08-25 13:33:41 +02001// RUN: %clang_analyze_cc1 %s \
2// RUN: -analyzer-checker=core \
3// RUN: -analyzer-checker=apiModeling.StdCLibraryFunctions \
4// RUN: -analyzer-config apiModeling.StdCLibraryFunctions:ModelPOSIX=true \
5// RUN: -analyzer-config apiModeling.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-empty
9
10// We test here the implementation of our summary API with Optional types. In
11// this TU we do not provide declaration for any of the functions that have
12// summaries. The implementation should be able to handle the nonexistent
13// declarations in a way that the summary is not added to the map. We expect no
14// 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() {
19 bar();
20}
21
22// CHECK-NOT: Loaded summary for: