clang 20.0.0git
CheckerContext.h
Go to the documentation of this file.
1//== CheckerContext.h - Context info for path-sensitive checkers--*- C++ -*--=//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file defines CheckerContext that provides contextual info for
10// path-sensitive checkers.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CHECKERCONTEXT_H
15#define LLVM_CLANG_STATICANALYZER_CORE_PATHSENSITIVE_CHECKERCONTEXT_H
16
19#include <optional>
20
21namespace clang {
22namespace ento {
23
25 ExprEngine &Eng;
26 /// The current exploded(symbolic execution) graph node.
27 ExplodedNode *Pred;
28 /// The flag is true if the (state of the execution) has been modified
29 /// by the checker using this context. For example, a new transition has been
30 /// added or a bug report issued.
31 bool Changed;
32 /// The tagged location, which is used to generate all new nodes.
33 const ProgramPoint Location;
34 NodeBuilder &NB;
35
36public:
37 /// If we are post visiting a call, this flag will be set if the
38 /// call was inlined. In all other cases it will be false.
39 const bool wasInlined;
40
42 ExprEngine &eng,
43 ExplodedNode *pred,
44 const ProgramPoint &loc,
45 bool wasInlined = false)
46 : Eng(eng),
47 Pred(pred),
48 Changed(false),
49 Location(loc),
50 NB(builder),
52 assert(Pred->getState() &&
53 "We should not call the checkers on an empty state.");
54 }
55
57 return Eng.getAnalysisManager();
58 }
59
61 return Eng.getConstraintManager();
62 }
63
65 return Eng.getStoreManager();
66 }
67
68 /// Returns the previous node in the exploded graph, which includes
69 /// the state of the program before the checker ran. Note, checkers should
70 /// not retain the node in their state since the nodes might get invalidated.
71 ExplodedNode *getPredecessor() { return Pred; }
72 const ProgramPoint getLocation() const { return Location; }
73 const ProgramStateRef &getState() const { return Pred->getState(); }
74
75 /// Check if the checker changed the state of the execution; ex: added
76 /// a new transition or a bug report.
77 bool isDifferent() { return Changed; }
78
79 /// Returns the number of times the current block has been visited
80 /// along the analyzed path.
81 unsigned blockCount() const {
82 return NB.getContext().blockCount();
83 }
84
86 return Eng.getContext();
87 }
88
89 const ASTContext &getASTContext() const { return Eng.getContext(); }
90
91 const LangOptions &getLangOpts() const {
92 return Eng.getContext().getLangOpts();
93 }
94
96 return Pred->getLocationContext();
97 }
98
100 return Pred->getStackFrame();
101 }
102
103 /// Return true if the current LocationContext has no caller context.
104 bool inTopFrame() const { return getLocationContext()->inTopFrame(); }
105
107 return Eng.getBugReporter();
108 }
109
112 }
113
115
117 return Eng.getSValBuilder();
118 }
119
122 }
123
125 return Eng.getStateManager();
126 }
127
130 }
131
132 /// Get the blockID.
133 unsigned getBlockID() const {
134 return NB.getContext().getBlock()->getBlockID();
135 }
136
137 /// If the given node corresponds to a PostStore program point,
138 /// retrieve the location region as it was uttered in the code.
139 ///
140 /// This utility can be useful for generating extensive diagnostics, for
141 /// example, for finding variables that the given symbol was assigned to.
143 ProgramPoint L = N->getLocation();
144 if (std::optional<PostStore> PSL = L.getAs<PostStore>())
145 return reinterpret_cast<const MemRegion*>(PSL->getLocationValue());
146 return nullptr;
147 }
148
149 /// Get the value of arbitrary expressions at this point in the path.
150 SVal getSVal(const Stmt *S) const {
151 return Pred->getSVal(S);
152 }
153
154 /// Returns true if the value of \p E is greater than or equal to \p
155 /// Val under unsigned comparison
156 bool isGreaterOrEqual(const Expr *E, unsigned long long Val);
157
158 /// Returns true if the value of \p E is negative.
159 bool isNegative(const Expr *E);
160
161 /// Generates a new transition in the program state graph
162 /// (ExplodedGraph). Uses the default CheckerContext predecessor node.
163 ///
164 /// @param State The state of the generated node. If not specified, the state
165 /// will not be changed, but the new node will have the checker's tag.
166 /// @param Tag The tag is used to uniquely identify the creation site. If no
167 /// tag is specified, a default tag, unique to the given checker,
168 /// will be used. Tags are used to prevent states generated at
169 /// different sites from caching out.
171 const ProgramPointTag *Tag = nullptr) {
172 return addTransitionImpl(State ? State : getState(), false, nullptr, Tag);
173 }
174
175 /// Generates a new transition with the given predecessor.
176 /// Allows checkers to generate a chain of nodes.
177 ///
178 /// @param State The state of the generated node.
179 /// @param Pred The transition will be generated from the specified Pred node
180 /// to the newly generated node.
181 /// @param Tag The tag to uniquely identify the creation site.
183 const ProgramPointTag *Tag = nullptr) {
184 return addTransitionImpl(State, false, Pred, Tag);
185 }
186
187 /// Generate a sink node. Generating a sink stops exploration of the
188 /// given path. To create a sink node for the purpose of reporting an error,
189 /// checkers should use generateErrorNode() instead.
191 const ProgramPointTag *Tag = nullptr) {
192 return addTransitionImpl(State ? State : getState(), true, Pred, Tag);
193 }
194
195 /// Add a sink node to the current path of execution, halting analysis.
196 void addSink(ProgramStateRef State = nullptr,
197 const ProgramPointTag *Tag = nullptr) {
198 if (!State)
199 State = getState();
200 addTransition(State, generateSink(State, getPredecessor()));
201 }
202
203 /// Generate a transition to a node that will be used to report
204 /// an error. This node will be a sink. That is, it will stop exploration of
205 /// the given path.
206 ///
207 /// @param State The state of the generated node.
208 /// @param Tag The tag to uniquely identify the creation site. If null,
209 /// the default tag for the checker will be used.
211 const ProgramPointTag *Tag = nullptr) {
212 return generateSink(State, Pred,
213 (Tag ? Tag : Location.getTag()));
214 }
215
216 /// Generate a transition to a node that will be used to report
217 /// an error. This node will be a sink. That is, it will stop exploration of
218 /// the given path.
219 ///
220 /// @param State The state of the generated node.
221 /// @param Pred The transition will be generated from the specified Pred node
222 /// to the newly generated node.
223 /// @param Tag The tag to uniquely identify the creation site. If null,
224 /// the default tag for the checker will be used.
226 ExplodedNode *Pred,
227 const ProgramPointTag *Tag = nullptr) {
228 return generateSink(State, Pred,
229 (Tag ? Tag : Location.getTag()));
230 }
231
232 /// Generate a transition to a node that will be used to report
233 /// an error. This node will not be a sink. That is, exploration will
234 /// continue along this path.
235 ///
236 /// @param State The state of the generated node.
237 /// @param Tag The tag to uniquely identify the creation site. If null,
238 /// the default tag for the checker will be used.
241 const ProgramPointTag *Tag = nullptr) {
242 return addTransition(State, (Tag ? Tag : Location.getTag()));
243 }
244
245 /// Generate a transition to a node that will be used to report
246 /// an error. This node will not be a sink. That is, exploration will
247 /// continue along this path.
248 ///
249 /// @param State The state of the generated node.
250 /// @param Pred The transition will be generated from the specified Pred node
251 /// to the newly generated node.
252 /// @param Tag The tag to uniquely identify the creation site. If null,
253 /// the default tag for the checker will be used.
256 ExplodedNode *Pred,
257 const ProgramPointTag *Tag = nullptr) {
258 return addTransition(State, Pred, (Tag ? Tag : Location.getTag()));
259 }
260
261 /// Emit the diagnostics report.
262 void emitReport(std::unique_ptr<BugReport> R) {
263 Changed = true;
264 Eng.getBugReporter().emitReport(std::move(R));
265 }
266
267 /// Produce a program point tag that displays an additional path note
268 /// to the user. This is a lightweight alternative to the
269 /// BugReporterVisitor mechanism: instead of visiting the bug report
270 /// node-by-node to restore the sequence of events that led to discovering
271 /// a bug, you can add notes as you add your transitions.
272 ///
273 /// @param Cb Callback with 'BugReporterContext &, BugReport &' parameters.
274 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
275 /// to omit the note from the report if it would make the displayed
276 /// bug path significantly shorter.
277 LLVM_ATTRIBUTE_RETURNS_NONNULL
278 const NoteTag *getNoteTag(NoteTag::Callback &&Cb, bool IsPrunable = false) {
279 return Eng.getDataTags().make<NoteTag>(std::move(Cb), IsPrunable);
280 }
281
282 /// A shorthand version of getNoteTag that doesn't require you to accept
283 /// the 'BugReporterContext' argument when you don't need it.
284 ///
285 /// @param Cb Callback only with 'BugReport &' parameter.
286 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
287 /// to omit the note from the report if it would make the displayed
288 /// bug path significantly shorter.
289 const NoteTag
290 *getNoteTag(std::function<std::string(PathSensitiveBugReport &)> &&Cb,
291 bool IsPrunable = false) {
292 return getNoteTag(
293 [Cb](BugReporterContext &,
294 PathSensitiveBugReport &BR) { return Cb(BR); },
295 IsPrunable);
296 }
297
298 /// A shorthand version of getNoteTag that doesn't require you to accept
299 /// the arguments when you don't need it.
300 ///
301 /// @param Cb Callback without parameters.
302 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
303 /// to omit the note from the report if it would make the displayed
304 /// bug path significantly shorter.
305 const NoteTag *getNoteTag(std::function<std::string()> &&Cb,
306 bool IsPrunable = false) {
307 return getNoteTag([Cb](BugReporterContext &,
308 PathSensitiveBugReport &) { return Cb(); },
309 IsPrunable);
310 }
311
312 /// A shorthand version of getNoteTag that accepts a plain note.
313 ///
314 /// @param Note The note.
315 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
316 /// to omit the note from the report if it would make the displayed
317 /// bug path significantly shorter.
318 const NoteTag *getNoteTag(StringRef Note, bool IsPrunable = false) {
319 return getNoteTag(
320 [Note = std::string(Note)](BugReporterContext &,
321 PathSensitiveBugReport &) { return Note; },
322 IsPrunable);
323 }
324
325 /// A shorthand version of getNoteTag that accepts a lambda with stream for
326 /// note.
327 ///
328 /// @param Cb Callback with 'BugReport &' and 'llvm::raw_ostream &'.
329 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
330 /// to omit the note from the report if it would make the displayed
331 /// bug path significantly shorter.
333 std::function<void(PathSensitiveBugReport &BR, llvm::raw_ostream &OS)> &&Cb,
334 bool IsPrunable = false) {
335 return getNoteTag(
336 [Cb](PathSensitiveBugReport &BR) -> std::string {
338 llvm::raw_svector_ostream OS(Str);
339 Cb(BR, OS);
340 return std::string(OS.str());
341 },
342 IsPrunable);
343 }
344
345 /// Returns the word that should be used to refer to the declaration
346 /// in the report.
347 StringRef getDeclDescription(const Decl *D);
348
349 /// Get the declaration of the called function (path-sensitive).
350 const FunctionDecl *getCalleeDecl(const CallExpr *CE) const;
351
352 /// Get the name of the called function (path-sensitive).
353 StringRef getCalleeName(const FunctionDecl *FunDecl) const;
354
355 /// Get the identifier of the called function (path-sensitive).
357 const FunctionDecl *FunDecl = getCalleeDecl(CE);
358 if (FunDecl)
359 return FunDecl->getIdentifier();
360 else
361 return nullptr;
362 }
363
364 /// Get the name of the called function (path-sensitive).
365 StringRef getCalleeName(const CallExpr *CE) const {
366 const FunctionDecl *FunDecl = getCalleeDecl(CE);
367 return getCalleeName(FunDecl);
368 }
369
370 /// Returns true if the given function is an externally-visible function in
371 /// the top-level namespace, such as \c malloc.
372 ///
373 /// If a name is provided, the function must additionally match the given
374 /// name.
375 ///
376 /// Note that this also accepts functions from the \c std namespace (because
377 /// headers like <cstdlib> declare them there) and does not check if the
378 /// function is declared as 'extern "C"' or if it uses C++ name mangling.
379 static bool isCLibraryFunction(const FunctionDecl *FD,
380 StringRef Name = StringRef());
381
382 /// In builds that use source hardening (-D_FORTIFY_SOURCE), many standard
383 /// functions are implemented as macros that expand to calls of hardened
384 /// functions that take additional arguments compared to the "usual"
385 /// variant and perform additional input validation. For example, a `memcpy`
386 /// call may expand to `__memcpy_chk()` or `__builtin___memcpy_chk()`.
387 ///
388 /// This method returns true if `FD` declares a fortified variant of the
389 /// standard library function `Name`.
390 ///
391 /// NOTE: This method relies on heuristics; extend it if you need to handle a
392 /// hardened variant that's not yet covered by it.
393 static bool isHardenedVariantOf(const FunctionDecl *FD, StringRef Name);
394
395 /// Depending on wither the location corresponds to a macro, return
396 /// either the macro name or the token spelling.
397 ///
398 /// This could be useful when checkers' logic depends on whether a function
399 /// is called with a given macro argument. For example:
400 /// s = socket(AF_INET,..)
401 /// If AF_INET is a macro, the result should be treated as a source of taint.
402 ///
403 /// \sa clang::Lexer::getSpelling(), clang::Lexer::getImmediateMacroName().
405
406private:
407 ExplodedNode *addTransitionImpl(ProgramStateRef State,
408 bool MarkAsSink,
409 ExplodedNode *P = nullptr,
410 const ProgramPointTag *Tag = nullptr) {
411 // The analyzer may stop exploring if it sees a state it has previously
412 // visited ("cache out"). The early return here is a defensive check to
413 // prevent accidental caching out by checker API clients. Unless there is a
414 // tag or the client checker has requested that the generated node be
415 // marked as a sink, we assume that a client requesting a transition to a
416 // state that is the same as the predecessor state has made a mistake. We
417 // return the predecessor rather than cache out.
418 //
419 // TODO: We could potentially change the return to an assertion to alert
420 // clients to their mistake, but several checkers (including
421 // DereferenceChecker, CallAndMessageChecker, and DynamicTypePropagation)
422 // rely upon the defensive behavior and would need to be updated.
423 if (!State || (State == Pred->getState() && !Tag && !MarkAsSink))
424 return Pred;
425
426 Changed = true;
427 const ProgramPoint &LocalLoc = (Tag ? Location.withTag(Tag) : Location);
428 if (!P)
429 P = Pred;
430
431 ExplodedNode *node;
432 if (MarkAsSink)
433 node = NB.generateSink(LocalLoc, State, P);
434 else
435 node = NB.generateNode(LocalLoc, State, P);
436 return node;
437 }
438};
439
440} // end GR namespace
441
442} // end clang namespace
443
444#endif
StringRef P
const Decl * D
Expr * E
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:188
const LangOptions & getLangOpts() const
Definition: ASTContext.h:834
AnalysisDeclContext contains the context data for the function, method or block under analysis.
unsigned getBlockID() const
Definition: CFG.h:1105
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition: Expr.h:2874
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:86
This represents one expression.
Definition: Expr.h:110
Represents a function declaration or definition.
Definition: Decl.h:1935
One of these records is kept for each identifier that is lexed.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:499
It wraps the AnalysisDeclContext to represent both the call stack with the help of StackFrameContext ...
LLVM_ATTRIBUTE_RETURNS_NONNULL AnalysisDeclContext * getAnalysisDeclContext() const
virtual bool inTopFrame() const
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
Definition: Decl.h:274
Represents a program point after a store evaluation.
Definition: ProgramPoint.h:426
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
Definition: Preprocessor.h:138
ProgramPoints can be "tagged" as representing points specific to a given analysis entity.
Definition: ProgramPoint.h:38
const ProgramPointTag * getTag() const
Definition: ProgramPoint.h:173
ProgramPoint withTag(const ProgramPointTag *tag) const
Create a new ProgramPoint object that is the same as the original except for using the specified tag ...
Definition: ProgramPoint.h:129
std::optional< T > getAs() const
Convert to the specified ProgramPoint type, returning std::nullopt if this ProgramPoint is not of the...
Definition: ProgramPoint.h:147
Encodes a location in the source.
This class handles loading and caching of source files into memory.
It represents a stack frame of the call stack (based on CallEvent).
Stmt - This represents one statement.
Definition: Stmt.h:84
BugReporter is a utility class for generating PathDiagnostics for analysis.
Definition: BugReporter.h:585
Preprocessor & getPreprocessor()
Definition: BugReporter.h:627
const SourceManager & getSourceManager()
Definition: BugReporter.h:623
virtual void emitReport(std::unique_ptr< BugReport > R)
Add the given report to the set of reports tracked by BugReporter.
ExplodedNode * getPredecessor()
Returns the previous node in the exploded graph, which includes the state of the program before the c...
ExplodedNode * generateErrorNode(ProgramStateRef State, ExplodedNode *Pred, const ProgramPointTag *Tag=nullptr)
Generate a transition to a node that will be used to report an error.
const IdentifierInfo * getCalleeIdentifier(const CallExpr *CE) const
Get the identifier of the called function (path-sensitive).
static const MemRegion * getLocationRegionIfPostStore(const ExplodedNode *N)
If the given node corresponds to a PostStore program point, retrieve the location region as it was ut...
SymbolManager & getSymbolManager()
StringRef getDeclDescription(const Decl *D)
Returns the word that should be used to refer to the declaration in the report.
Preprocessor & getPreprocessor()
unsigned blockCount() const
Returns the number of times the current block has been visited along the analyzed path.
ExplodedNode * generateSink(ProgramStateRef State, ExplodedNode *Pred, const ProgramPointTag *Tag=nullptr)
Generate a sink node.
const SourceManager & getSourceManager()
SValBuilder & getSValBuilder()
CheckerContext(NodeBuilder &builder, ExprEngine &eng, ExplodedNode *pred, const ProgramPoint &loc, bool wasInlined=false)
const NoteTag * getNoteTag(std::function< std::string()> &&Cb, bool IsPrunable=false)
A shorthand version of getNoteTag that doesn't require you to accept the arguments when you don't nee...
StringRef getCalleeName(const FunctionDecl *FunDecl) const
Get the name of the called function (path-sensitive).
const NoteTag * getNoteTag(StringRef Note, bool IsPrunable=false)
A shorthand version of getNoteTag that accepts a plain note.
const StackFrameContext * getStackFrame() const
StringRef getCalleeName(const CallExpr *CE) const
Get the name of the called function (path-sensitive).
const ProgramStateRef & getState() const
ExplodedNode * addTransition(ProgramStateRef State=nullptr, const ProgramPointTag *Tag=nullptr)
Generates a new transition in the program state graph (ExplodedGraph).
ConstraintManager & getConstraintManager()
SVal getSVal(const Stmt *S) const
Get the value of arbitrary expressions at this point in the path.
BugReporter & getBugReporter()
bool isDifferent()
Check if the checker changed the state of the execution; ex: added a new transition or a bug report.
ExplodedNode * addTransition(ProgramStateRef State, ExplodedNode *Pred, const ProgramPointTag *Tag=nullptr)
Generates a new transition with the given predecessor.
bool isNegative(const Expr *E)
Returns true if the value of E is negative.
AnalysisDeclContext * getCurrentAnalysisDeclContext() const
bool isGreaterOrEqual(const Expr *E, unsigned long long Val)
Returns true if the value of E is greater than or equal to Val under unsigned comparison.
const ProgramPoint getLocation() const
static bool isCLibraryFunction(const FunctionDecl *FD, StringRef Name=StringRef())
Returns true if the given function is an externally-visible function in the top-level namespace,...
ExplodedNode * generateNonFatalErrorNode(ProgramStateRef State=nullptr, const ProgramPointTag *Tag=nullptr)
Generate a transition to a node that will be used to report an error.
LLVM_ATTRIBUTE_RETURNS_NONNULL const NoteTag * getNoteTag(NoteTag::Callback &&Cb, bool IsPrunable=false)
Produce a program point tag that displays an additional path note to the user.
const ASTContext & getASTContext() const
AnalysisManager & getAnalysisManager()
ExplodedNode * generateErrorNode(ProgramStateRef State=nullptr, const ProgramPointTag *Tag=nullptr)
Generate a transition to a node that will be used to report an error.
const FunctionDecl * getCalleeDecl(const CallExpr *CE) const
Get the declaration of the called function (path-sensitive).
void addSink(ProgramStateRef State=nullptr, const ProgramPointTag *Tag=nullptr)
Add a sink node to the current path of execution, halting analysis.
const NoteTag * getNoteTag(std::function< void(PathSensitiveBugReport &BR, llvm::raw_ostream &OS)> &&Cb, bool IsPrunable=false)
A shorthand version of getNoteTag that accepts a lambda with stream for note.
ProgramStateManager & getStateManager()
StringRef getMacroNameOrSpelling(SourceLocation &Loc)
Depending on wither the location corresponds to a macro, return either the macro name or the token sp...
const LangOptions & getLangOpts() const
bool inTopFrame() const
Return true if the current LocationContext has no caller context.
const LocationContext * getLocationContext() const
const bool wasInlined
If we are post visiting a call, this flag will be set if the call was inlined.
ExplodedNode * generateNonFatalErrorNode(ProgramStateRef State, ExplodedNode *Pred, const ProgramPointTag *Tag=nullptr)
Generate a transition to a node that will be used to report an error.
StoreManager & getStoreManager()
const NoteTag * getNoteTag(std::function< std::string(PathSensitiveBugReport &)> &&Cb, bool IsPrunable=false)
A shorthand version of getNoteTag that doesn't require you to accept the 'BugReporterContext' argumen...
static bool isHardenedVariantOf(const FunctionDecl *FD, StringRef Name)
In builds that use source hardening (-D_FORTIFY_SOURCE), many standard functions are implemented as m...
void emitReport(std::unique_ptr< BugReport > R)
Emit the diagnostics report.
unsigned getBlockID() const
Get the blockID.
const DataTagType * make(Args &&... ConstructorArgs)
Definition: BugReporter.h:764
const ProgramStateRef & getState() const
ProgramPoint getLocation() const
getLocation - Returns the edge associated with the given node.
const StackFrameContext * getStackFrame() const
SVal getSVal(const Stmt *S) const
Get the value of an arbitrary expression at this node.
const LocationContext * getLocationContext() const
ProgramStateManager & getStateManager()
Definition: ExprEngine.h:414
ASTContext & getContext() const
getContext - Return the ASTContext associated with this analysis.
Definition: ExprEngine.h:196
StoreManager & getStoreManager()
Definition: ExprEngine.h:416
BugReporter & getBugReporter()
Definition: ExprEngine.h:210
ConstraintManager & getConstraintManager()
Definition: ExprEngine.h:418
DataTag::Factory & getDataTags()
Definition: ExprEngine.h:430
AnalysisManager & getAnalysisManager()
Definition: ExprEngine.h:198
SValBuilder & getSValBuilder()
Definition: ExprEngine.h:208
MemRegion - The root abstract class for all memory regions.
Definition: MemRegion.h:97
const CFGBlock * getBlock() const
Return the CFGBlock associated with this builder.
Definition: CoreEngine.h:209
unsigned blockCount() const
Returns the number of times the current basic block has been visited on the exploded graph path.
Definition: CoreEngine.h:216
This is the simplest builder which generates nodes in the ExplodedGraph.
Definition: CoreEngine.h:232
ExplodedNode * generateNode(const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred)
Generates a node in the ExplodedGraph.
Definition: CoreEngine.h:285
ExplodedNode * generateSink(const ProgramPoint &PP, ProgramStateRef State, ExplodedNode *Pred)
Generates a sink in the ExplodedGraph.
Definition: CoreEngine.h:298
const NodeBuilderContext & getContext()
Definition: CoreEngine.h:324
The tag upon which the TagVisitor reacts.
Definition: BugReporter.h:779
std::function< std::string(BugReporterContext &, PathSensitiveBugReport &)> Callback
Definition: BugReporter.h:782
SymbolManager & getSymbolManager()
Definition: SValBuilder.h:164
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
Definition: SVals.h:56
@ OS
Indicates that the tracking object is a descendant of a referenced-counted OSObject,...
The JSON file list parser is used to communicate input to InstallAPI.
#define false
Definition: stdbool.h:26