clang 24.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 /// At the end of the checker evaluation, the analysis will continue from the
35 /// nodes in this set. When the checker adds a transition, freshly created
36 /// non-sink nodes are added to the `Frontier` and the node that was the
37 /// source of the transition is unconditionally removed from the `Frontier`
38 /// (it is superseded, even if the node creation fails or produces a sink).
39 /// At the beginning, the `Frontier` usually contains `Pred`.
40 ExplodedNodeSet &Frontier;
41
42public:
43 /// If we are post visiting a call, this flag will be set if the
44 /// call was inlined. In all other cases it will be false.
45 const bool wasInlined;
46
48 const ProgramPoint &Loc, bool WasInlined = false)
49 : Eng(Eng), Pred(Pred), Changed(false), Location(Loc), Frontier(Dst),
50 wasInlined(WasInlined) {
51 assert(Pred->getState() &&
52 "We should not call the checkers on an empty state.");
53 assert(Loc.getTag() && "The ProgramPoint associated with CheckerContext "
54 "must be tagged with the active checker.");
55 }
56
58 return Eng.getAnalysisManager();
59 }
61 return Eng.getAnalysisManager();
62 }
63
65 return Eng.getConstraintManager();
66 }
68 return Eng.getConstraintManager();
69 }
70
72 return Eng.getStoreManager();
73 }
74 const StoreManager &getStoreManager() const { return Eng.getStoreManager(); }
75
76 /// Returns the previous node in the exploded graph, which includes
77 /// the state of the program before the checker ran. Note, checkers should
78 /// not retain the node in their state since the nodes might get invalidated.
79 ExplodedNode *getPredecessor() const { return Pred; }
80 const ProgramPoint getLocation() const { return Location; }
81 const ProgramStateRef &getState() const { return Pred->getState(); }
82
83 /// Check if the checker changed the state of the execution; ex: added
84 /// a new transition or a bug report.
85 bool isDifferent() const { return Changed; }
86
87 /// Returns the number of times the current block has been visited
88 /// along the analyzed path.
89 unsigned blockCount() const { return Eng.getNumVisitedCurrent(); }
90
92 return Eng.getContext();
93 }
94
95 const ASTContext &getASTContext() const { return Eng.getContext(); }
96
97 const LangOptions &getLangOpts() const {
98 return Eng.getContext().getLangOpts();
99 }
100
101 const StackFrame *getStackFrame() const { return Pred->getStackFrame(); }
102
103 /// Iterates over the current stack frame and all of its ancestors.
104 llvm::iterator_range<StackFrame::parent_iterator> stackframes() const {
106 }
107
108 /// Return true if the current StackFrame has no caller context.
109 bool inTopFrame() const { return getStackFrame()->inTopFrame(); }
110
112 return Eng.getBugReporter();
113 }
114 const BugReporter &getBugReporter() const { return Eng.getBugReporter(); }
115
121 }
122
126 }
127
129 return Eng.getSValBuilder();
130 }
131 const SValBuilder &getSValBuilder() const { return Eng.getSValBuilder(); }
132
138 }
139
141 return Eng.getStateManager();
142 }
144 return Eng.getStateManager();
145 }
146
150
151 /// Get the blockID.
152 unsigned getBlockID() const { return Eng.getCurrBlock()->getBlockID(); }
153
154 /// If the given node corresponds to a PostStore program point,
155 /// retrieve the location region as it was uttered in the code.
156 ///
157 /// This utility can be useful for generating extensive diagnostics, for
158 /// example, for finding variables that the given symbol was assigned to.
160 ProgramPoint L = N->getLocation();
161 if (std::optional<PostStore> PSL = L.getAs<PostStore>())
162 return reinterpret_cast<const MemRegion*>(PSL->getLocationValue());
163 return nullptr;
164 }
165
166 /// Get the value of arbitrary expressions at this point in the path.
167 SVal getSVal(const Expr *E) const { return Pred->getSVal(E); }
168
169 ConstCFGElementRef getCFGElementRef() const { return Eng.getCFGElementRef(); }
170
171 /// Returns true if the value of \p E is greater than or equal to \p
172 /// Val under unsigned comparison.
173 bool isGreaterOrEqual(const Expr *E, unsigned long long Val);
174
175 /// Returns true if the value of \p E is negative.
176 bool isNegative(const Expr *E);
177
178 /// Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of
179 /// 'getPredecessor()', the node that was passed to the constructor of
180 /// CheckerContext.
181 /// Can return nullptr if the node creation fails (when it would recreate
182 /// an existing node or when the state is posteriorly overconstrained).
183 /// Can return 'getPredecessor()' instead of creating a node when the state
184 /// would remain unchanged and there is no explicitly specified tag.
185 ///
186 /// @param State The state of the generated node. Passing nullptr is handled
187 /// as passing 'getState()' (the state of 'getPredecessor()').
188 /// @param Tag A ProgramPointTag that will be attached to the node. This is
189 /// primarily useful for attaching a NoteTag; but another tag could be
190 /// used as a workaround when the node wouldn't be unique otherwise.
191 /// When \p Tag is nullptr, node creation will default to using the
192 /// active checker as the tag -- but if there is no state change,
193 /// the predecessor node may be returned even if it isn't tagged so.
195 const ProgramPointTag *Tag = nullptr) {
196 if ((!State || State == getState()) && !Tag)
197 return getPredecessor();
198 return addTransitionImpl(State, false, nullptr, Tag);
199 }
200
201 /// Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of
202 /// the parameter \p Pred. Allows checkers to make a chain of nodes.
203 /// Can return nullptr if the node creation fails (when it would recreate
204 /// an existing node or when the state is posteriorly overconstrained).
205 /// Can return \p Pred instead of creating a new node when the state is null
206 /// or when the state would remain unchanged and there is no explicitly
207 /// specified tag.
208 ///
209 /// @param State The state of the generated node.
210 /// @param Pred The node that will become the predecessor of the new node.
211 /// When null, the method falls back to using 'getPredecessor()'.
212 /// @param Tag A ProgramPointTag that will be attached to the node. This is
213 /// primarily useful for attaching a NoteTag; but another tag could be
214 /// used as a workaround when the node wouldn't be unique otherwise.
215 /// When \p Tag is nullptr, node creation will default to using the
216 /// active checker as the tag.
218 const ProgramPointTag *Tag = nullptr) {
219 if (!Pred)
220 Pred = getPredecessor();
221 if (!State)
222 return Pred;
223 if (State == Pred->getState() && !Tag)
224 return Pred;
225 return addTransitionImpl(State, false, Pred, Tag);
226 }
227
228 /// Creates a new ExplodedNode which is marked as a sink and adds it to the
229 /// ExplodedGraph.
230 /// A sink node terminates the execution path: it cannot have children and
231 /// prevents the default behavior that the path "passes through" the checker
232 /// callback without changes if the checker doesn't create any node.
233 /// Can return nullptr if the node creation fails (when it would recreate
234 /// an existing node or when the state is posteriorly overconstrained).
235 ///
236 /// @param State The state of the generated sink node; nullptr (the default)
237 /// means keeping the state of the parent node.
238 /// @param Pred The node that will become the predecessor of the new node;
239 /// nullptr (the default) means the node that was passed to the
240 /// constructor of CheckerContext.
241 /// @param Tag A ProgramPointTag that will be attached to the node; nullptr
242 /// (the default) means using the active checker as the tag. Using
243 /// another tag has no compelling use case (apart from debugging).
244 ExplodedNode *addSink(const ProgramStateRef &State = nullptr,
245 ExplodedNode *Pred = nullptr,
246 const ProgramPointTag *Tag = nullptr) {
247 return addTransitionImpl(State, true, Pred, Tag);
248 }
249
250 /// Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of
251 /// 'getPredecessor()', the node that was passed to the constructor of
252 /// CheckerContext. The difference between this and 'addTransition' is that
253 /// this always attempts to create a new node, even if there is no state
254 /// change and no explicitly speficified tag.
255 /// Can return nullptr if the node creation fails (when it would recreate
256 /// an existing node or when the state is posteriorly overconstrained).
257 ///
258 /// @param State The state of the generated node. Passing nullptr is handled
259 /// as passing 'getState()' (the state of 'getPredecessor()').
260 /// @param Tag A ProgramPointTag that will be attached to the node. This is
261 /// primarily useful for attaching a NoteTag; but another tag could be
262 /// used as a workaround when the node wouldn't be unique otherwise.
263 /// When \p Tag is nullptr, node creation will default to using the
264 /// active checker as the tag.
267 const ProgramPointTag *Tag = nullptr) {
268 return addTransitionImpl(State, false, nullptr, Tag);
269 }
270
271 /// Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of
272 /// the parameter \p Pred. Allows checkers to make a chain of nodes.
273 /// The difference between this and 'addTransition()' is that this always
274 /// attempts to create a new node (even if there is no state change and no
275 /// explicitly specified tag).
276 /// Can return nullptr if the node creation fails (when it would recreate
277 /// an existing node or when the state is posteriorly overconstrained).
278 ///
279 /// @param State The state of the generated node.
280 /// @param Pred The node that will become the predecessor of the new node.
281 /// @param Tag A ProgramPointTag that will be attached to the node. This is
282 /// primarily useful for attaching a NoteTag; but another tag could be
283 /// used as a workaround when the node wouldn't be unique otherwise.
284 /// When \p Tag is nullptr, node creation will default to using the
285 /// active checker as the tag.
288 const ProgramPointTag *Tag = nullptr) {
289 return addTransitionImpl(State, false, Pred, Tag);
290 }
291
292 /// Emit the diagnostics report.
293 void emitReport(std::unique_ptr<BugReport> R) {
294 Changed = true;
295 Eng.getBugReporter().emitReport(std::move(R));
296 }
297
298 /// Produce a program point tag that displays an additional path note
299 /// to the user. This is a lightweight alternative to the
300 /// BugReporterVisitor mechanism: instead of visiting the bug report
301 /// node-by-node to restore the sequence of events that led to discovering
302 /// a bug, you can add notes as you add your transitions.
303 ///
304 /// @param Cb Callback with 'BugReporterContext &, BugReport &' parameters.
305 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
306 /// to omit the note from the report if it would make the displayed
307 /// bug path significantly shorter.
308 LLVM_ATTRIBUTE_RETURNS_NONNULL
309 const NoteTag *getNoteTag(NoteTag::Callback &&Cb, bool IsPrunable = false) {
310 return Eng.getDataTags().make<NoteTag>(std::move(Cb), IsPrunable);
311 }
312
313 /// A shorthand version of getNoteTag that doesn't require you to accept
314 /// the 'BugReporterContext' argument when you don't need it.
315 ///
316 /// @param Cb Callback only with 'BugReport &' parameter.
317 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
318 /// to omit the note from the report if it would make the displayed
319 /// bug path significantly shorter.
320 const NoteTag
322 bool IsPrunable = false) {
323 return getNoteTag(
324 [Cb](BugReporterContext &,
325 PathSensitiveBugReport &BR) { return Cb(BR); },
326 IsPrunable);
327 }
328
329 /// A shorthand version of getNoteTag that doesn't require you to accept
330 /// the arguments when you don't need it.
331 ///
332 /// @param Cb Callback without parameters.
333 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
334 /// to omit the note from the report if it would make the displayed
335 /// bug path significantly shorter.
336 const NoteTag *getNoteTag(std::function<std::string()> &&Cb,
337 bool IsPrunable = false) {
338 return getNoteTag([Cb](BugReporterContext &,
339 PathSensitiveBugReport &) { return Cb(); },
340 IsPrunable);
341 }
342
343 /// A shorthand version of getNoteTag that accepts a plain note.
344 ///
345 /// @param Note The note.
346 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
347 /// to omit the note from the report if it would make the displayed
348 /// bug path significantly shorter.
349 const NoteTag *getNoteTag(StringRef Note, bool IsPrunable = false) {
350 return getNoteTag(
351 [Note = std::string(Note)](BugReporterContext &,
352 PathSensitiveBugReport &) { return Note; },
353 IsPrunable);
354 }
355
356 /// A shorthand version of getNoteTag that accepts a lambda with stream for
357 /// note.
358 ///
359 /// @param Cb Callback with 'BugReport &' and 'llvm::raw_ostream &'.
360 /// @param IsPrunable Whether the note is prunable. It allows BugReporter
361 /// to omit the note from the report if it would make the displayed
362 /// bug path significantly shorter.
364 std::function<void(PathSensitiveBugReport &BR, llvm::raw_ostream &OS)> &&Cb,
365 bool IsPrunable = false) {
366 return getNoteTag(
367 [Cb](PathSensitiveBugReport &BR) -> std::string {
369 llvm::raw_svector_ostream OS(Str);
370 Cb(BR, OS);
371 return std::string(OS.str());
372 },
373 IsPrunable);
374 }
375
376 /// Returns the word that should be used to refer to the declaration
377 /// in the report.
378 StringRef getDeclDescription(const Decl *D);
379
380 /// Get the declaration of the called function (path-sensitive).
381 const FunctionDecl *getCalleeDecl(const CallExpr *CE) const;
382
383 /// Get the name of the called function (path-sensitive).
384 StringRef getCalleeName(const FunctionDecl *FunDecl) const;
385
386 /// Get the identifier of the called function (path-sensitive).
388 const FunctionDecl *FunDecl = getCalleeDecl(CE);
389 if (FunDecl)
390 return FunDecl->getIdentifier();
391 else
392 return nullptr;
393 }
394
395 /// Get the name of the called function (path-sensitive).
396 StringRef getCalleeName(const CallExpr *CE) const {
397 const FunctionDecl *FunDecl = getCalleeDecl(CE);
398 return getCalleeName(FunDecl);
399 }
400
401 /// Returns true if the given function is an externally-visible function in
402 /// the top-level namespace, such as \c malloc.
403 ///
404 /// If a name is provided, the function must additionally match the given
405 /// name.
406 ///
407 /// Note that this also accepts functions from the \c std namespace (because
408 /// headers like <cstdlib> declare them there) and does not check if the
409 /// function is declared as 'extern "C"' or if it uses C++ name mangling.
410 static bool isCLibraryFunction(const FunctionDecl *FD,
411 StringRef Name = StringRef());
412
413 /// In builds that use source hardening (-D_FORTIFY_SOURCE), many standard
414 /// functions are implemented as macros that expand to calls of hardened
415 /// functions that take additional arguments compared to the "usual"
416 /// variant and perform additional input validation. For example, a `memcpy`
417 /// call may expand to `__memcpy_chk()` or `__builtin___memcpy_chk()`.
418 ///
419 /// This method returns true if `FD` declares a fortified variant of the
420 /// standard library function `Name`.
421 ///
422 /// NOTE: This method relies on heuristics; extend it if you need to handle a
423 /// hardened variant that's not yet covered by it.
424 static bool isHardenedVariantOf(const FunctionDecl *FD, StringRef Name);
425
426 /// Depending on whether the location corresponds to a macro, return
427 /// either the macro name or the token spelling.
428 ///
429 /// This could be useful when checkers' logic depends on whether a function
430 /// is called with a given macro argument. For example:
431 /// s = socket(AF_INET,..)
432 /// If AF_INET is a macro, the result should be treated as a source of taint.
433 ///
434 /// \sa clang::Lexer::getSpelling(), clang::Lexer::getImmediateMacroName().
436
437private:
438 ExplodedNode *addTransitionImpl(const ProgramStateRef &State, bool MarkAsSink,
439 ExplodedNode *P, const ProgramPointTag *Tag) {
440 Changed = true;
441 const ProgramPoint &LocalLoc = (Tag ? Location.withTag(Tag) : Location);
442
443 if (!P)
444 P = getPredecessor();
445
446 Frontier.erase(P);
448 LocalLoc, State ? State.get() : P->getState().get(), P, MarkAsSink);
449
450 Frontier.insert(N);
451 return N;
452 }
453};
454
455} // end GR namespace
456
457} // end clang namespace
458
459#endif
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition ASTContext.h:245
AnalysisDeclContext contains the context data for the function, method or block under analysis.
const StackFrame * getStackFrame(const StackFrame *ParentSF, const void *Data, const Expr *E, const CFGBlock *Blk, unsigned BlockCount, unsigned Index)
Obtain a context of the call stack using its parent context.
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Definition Expr.h:3012
Decl - This represents one declaration (or definition), e.g.
Definition DeclBase.h:86
This represents one expression.
Definition Expr.h:114
Represents a function declaration or definition.
Definition Decl.h:2082
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...
IdentifierInfo * getIdentifier() const
Get the identifier that names this declaration, if there is one.
Definition Decl.h:297
Represents a program point after a store evaluation.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
ProgramPoints can be "tagged" as representing points specific to a given analysis entity.
std::optional< T > getAs() const
Convert to the specified ProgramPoint type, returning std::nullopt if this ProgramPoint is not of the...
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.
LLVM_ATTRIBUTE_RETURNS_NONNULL AnalysisDeclContext * getAnalysisDeclContext() const
llvm::iterator_range< parent_iterator > parentsIncludingSelf() const
Iterates over this frame followed by all of its ancestors.
BugReporter is a utility class for generating PathDiagnostics for analysis.
Preprocessor & getPreprocessor()
const SourceManager & getSourceManager()
const IdentifierInfo * getCalleeIdentifier(const CallExpr *CE) const
Get the identifier of the called function (path-sensitive).
CheckerContext(ExprEngine &Eng, ExplodedNode *Pred, ExplodedNodeSet &Dst, const ProgramPoint &Loc, bool WasInlined=false)
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()
SVal getSVal(const Expr *E) const
Get the value of arbitrary expressions at this point in the path.
unsigned blockCount() const
Returns the number of times the current block has been visited along the analyzed path.
const SourceManager & getSourceManager()
ExplodedNode * addSink(const ProgramStateRef &State=nullptr, ExplodedNode *Pred=nullptr, const ProgramPointTag *Tag=nullptr)
Creates a new ExplodedNode which is marked as a sink and adds it to the ExplodedGraph.
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...
llvm::iterator_range< StackFrame::parent_iterator > stackframes() const
Iterates over the current stack frame and all of its ancestors.
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 SourceManager & getSourceManager() const
std::string getMacroNameOrSpelling(SourceLocation &Loc)
Depending on whether the location corresponds to a macro, return either the macro name or the token s...
StringRef getCalleeName(const CallExpr *CE) const
Get the name of the called function (path-sensitive).
const ProgramStateRef & getState() const
ConstraintManager & getConstraintManager()
ExplodedNode * addTransition(const ProgramStateRef &State, ExplodedNode *Pred, const ProgramPointTag *Tag=nullptr)
Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of the parameter Pred.
ExplodedNode * generateNonFatalErrorNode(const ProgramStateRef &State, ExplodedNode *Pred, const ProgramPointTag *Tag=nullptr)
Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of the parameter Pred.
bool isNegative(const Expr *E)
Returns true if the value of E is negative.
const Preprocessor & getPreprocessor() const
const SValBuilder & getSValBuilder() const
AnalysisDeclContext * getCurrentAnalysisDeclContext() const
ExplodedNode * getPredecessor() const
Returns the previous node in the exploded graph, which includes the state of the program before the c...
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,...
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
ConstCFGElementRef getCFGElementRef() const
AnalysisManager & getAnalysisManager()
const FunctionDecl * getCalleeDecl(const CallExpr *CE) const
Get the declaration of the called function (path-sensitive).
ExplodedNode * addTransition(const ProgramStateRef &State=nullptr, const ProgramPointTag *Tag=nullptr)
Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of 'getPredecessor()',...
const SymbolManager & getSymbolManager() const
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()
const ProgramStateManager & getStateManager() const
const StoreManager & getStoreManager() const
const LangOptions & getLangOpts() const
const BugReporter & getBugReporter() const
bool inTopFrame() const
Return true if the current StackFrame has no caller context.
const ConstraintManager & getConstraintManager() const
const bool wasInlined
If we are post visiting a call, this flag will be set if the call was inlined.
ExplodedNode * generateNonFatalErrorNode(const ProgramStateRef &State=nullptr, const ProgramPointTag *Tag=nullptr)
Creates a new ExplodedNode and adds it to the ExplodedGraph as a child of 'getPredecessor()',...
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...
const AnalysisManager & getAnalysisManager() const
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.
bool isDifferent() const
Check if the checker changed the state of the execution; ex: added a new transition or a bug report.
const StackFrame * getStackFrame() const
unsigned getBlockID() const
Get the blockID.
ExplodedNode * makeNode(const ProgramPoint &Loc, const ProgramState *State, ExplodedNode *Pred, bool MarkAsSink=false) const
ExplodedNodeSet is a set of ExplodedNode * elements with the invariant that its elements cannot be nu...
void insert(ExplodedNode *N)
bool erase(ExplodedNode *N)
const ProgramStateRef & getState() const
ProgramPoint getLocation() const
getLocation - Returns the edge associated with the given node.
const CoreEngine & getCoreEngine() const
Definition ExprEngine.h:472
MemRegion - The root abstract class for all memory regions.
Definition MemRegion.h:97
The tag upon which the TagVisitor reacts.
std::function< std::string(BugReporterContext &, PathSensitiveBugReport &)> Callback
SymbolManager & getSymbolManager()
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
Definition SVals.h:57
IntrusiveRefCntPtr< const ProgramState > ProgramStateRef
@ OS
Indicates that the tracking object is a descendant of a referenced-counted OSObject,...
Top level wrappers for InstallAPI frontend operations.
CFGBlock::ConstCFGElementRef ConstCFGElementRef
Definition CFG.h:1271
int const char * function
Definition c++config.h:31
#define false
Definition stdbool.h:26