1 // RUN: %clang_analyze_cc1 -analyzer-checker=core -analyzer-config faux-bodies=true,model-path=%S/Inputs/Models -analyzer-output=plist-multi-file -verify %s -o %t
2 // RUN: %normalize_plist <%t | diff -ub %S/Inputs/expected-plists/model-file.cpp.plist -
6 // This function is modeled and the p pointer is dereferenced in the model
7 // function and there is no function definition available. The modeled
8 // function can use any types that are available in the original translation
9 // unit, for example intptr in this case.
10 void modeledFunction(intptr p
);
12 // This function is modeled and returns true if the parameter is not zero
13 // and there is no function definition available.
16 // This functions is not modeled and there is no function definition.
18 bool notzero_notmodeled(int i
);
21 // There is a nullpointer dereference inside this function.
26 // It is known that p != 0 because of the information provided by the
27 // model of the notzero function.
31 if (notzero_notmodeled(p
)) {
32 // There is no information about the value of p, because
33 // notzero_notmodeled is not modeled and the function definition
35 int j
= 5 / p
; // expected-warning {{Division by zero}}