@@ -80,58 +80,56 @@ class SymbolRegionValue : public SymbolData {
80
80
// / A symbol representing the result of an expression in the case when we do
81
81
// / not know anything about what the expression is.
82
82
class SymbolConjured : public SymbolData {
83
- CFGBlock:: ConstCFGElementRef ElemRef ;
83
+ ConstCFGElementRef Elem ;
84
84
QualType T;
85
85
unsigned Count;
86
86
const LocationContext *LCtx;
87
87
const void *SymbolTag;
88
88
89
89
friend class SymExprAllocator ;
90
- SymbolConjured (SymbolID sym, CFGBlock:: ConstCFGElementRef elemRef ,
90
+ SymbolConjured (SymbolID sym, ConstCFGElementRef elem ,
91
91
const LocationContext *lctx, QualType t, unsigned count,
92
92
const void *symbolTag)
93
- : SymbolData(SymbolConjuredKind, sym), ElemRef(elemRef ), T(t),
94
- Count (count), LCtx(lctx), SymbolTag(symbolTag) {
93
+ : SymbolData(SymbolConjuredKind, sym), Elem(elem ), T(t), Count(count ),
94
+ LCtx (lctx), SymbolTag(symbolTag) {
95
95
assert (lctx);
96
96
assert (isValidTypeForSymbol (t));
97
97
}
98
98
99
99
public:
100
- const CFGBlock::ConstCFGElementRef getCFGElementRef () const {
101
- return ElemRef;
102
- }
100
+ ConstCFGElementRef getCFGElementRef () const { return Elem; }
103
101
104
102
// It might return null.
105
103
const Stmt *getStmt () const {
106
- switch (ElemRef ->getKind ()) {
104
+ switch (Elem ->getKind ()) {
107
105
case CFGElement::Initializer:
108
- return ElemRef ->castAs <CFGInitializer>().getInitializer ()->getInit ();
106
+ return Elem ->castAs <CFGInitializer>().getInitializer ()->getInit ();
109
107
case CFGElement::ScopeBegin:
110
- return ElemRef ->castAs <CFGScopeBegin>().getTriggerStmt ();
108
+ return Elem ->castAs <CFGScopeBegin>().getTriggerStmt ();
111
109
case CFGElement::ScopeEnd:
112
- return ElemRef ->castAs <CFGScopeEnd>().getTriggerStmt ();
110
+ return Elem ->castAs <CFGScopeEnd>().getTriggerStmt ();
113
111
case CFGElement::NewAllocator:
114
- return ElemRef ->castAs <CFGNewAllocator>().getAllocatorExpr ();
112
+ return Elem ->castAs <CFGNewAllocator>().getAllocatorExpr ();
115
113
case CFGElement::LifetimeEnds:
116
- return ElemRef ->castAs <CFGLifetimeEnds>().getTriggerStmt ();
114
+ return Elem ->castAs <CFGLifetimeEnds>().getTriggerStmt ();
117
115
case CFGElement::LoopExit:
118
- return ElemRef ->castAs <CFGLoopExit>().getLoopStmt ();
116
+ return Elem ->castAs <CFGLoopExit>().getLoopStmt ();
119
117
case CFGElement::Statement:
120
- return ElemRef ->castAs <CFGStmt>().getStmt ();
118
+ return Elem ->castAs <CFGStmt>().getStmt ();
121
119
case CFGElement::Constructor:
122
- return ElemRef ->castAs <CFGConstructor>().getStmt ();
120
+ return Elem ->castAs <CFGConstructor>().getStmt ();
123
121
case CFGElement::CXXRecordTypedCall:
124
- return ElemRef ->castAs <CFGCXXRecordTypedCall>().getStmt ();
122
+ return Elem ->castAs <CFGCXXRecordTypedCall>().getStmt ();
125
123
case CFGElement::AutomaticObjectDtor:
126
- return ElemRef ->castAs <CFGAutomaticObjDtor>().getTriggerStmt ();
124
+ return Elem ->castAs <CFGAutomaticObjDtor>().getTriggerStmt ();
127
125
case CFGElement::DeleteDtor:
128
- return ElemRef ->castAs <CFGDeleteDtor>().getDeleteExpr ();
126
+ return Elem ->castAs <CFGDeleteDtor>().getDeleteExpr ();
129
127
case CFGElement::BaseDtor:
130
128
return nullptr ;
131
129
case CFGElement::MemberDtor:
132
130
return nullptr ;
133
131
case CFGElement::TemporaryDtor:
134
- return ElemRef ->castAs <CFGTemporaryDtor>().getBindTemporaryExpr ();
132
+ return Elem ->castAs <CFGTemporaryDtor>().getBindTemporaryExpr ();
135
133
case CFGElement::CleanupFunction:
136
134
return nullptr ;
137
135
}
@@ -148,20 +146,19 @@ class SymbolConjured : public SymbolData {
148
146
149
147
void dumpToStream (raw_ostream &os) const override ;
150
148
151
- static void Profile (llvm::FoldingSetNodeID &profile,
152
- CFGBlock::ConstCFGElementRef ElemRef,
149
+ static void Profile (llvm::FoldingSetNodeID &profile, ConstCFGElementRef Elem,
153
150
const LocationContext *LCtx, QualType T, unsigned Count,
154
151
const void *SymbolTag) {
155
152
profile.AddInteger ((unsigned )SymbolConjuredKind);
156
- profile.Add (ElemRef );
153
+ profile.Add (Elem );
157
154
profile.AddPointer (LCtx);
158
155
profile.Add (T);
159
156
profile.AddInteger (Count);
160
157
profile.AddPointer (SymbolTag);
161
158
}
162
159
163
160
void Profile (llvm::FoldingSetNodeID& profile) override {
164
- Profile (profile, ElemRef , LCtx, T, Count, SymbolTag);
161
+ Profile (profile, Elem , LCtx, T, Count, SymbolTag);
165
162
}
166
163
167
164
// Implement isa<T> support.
@@ -569,12 +566,12 @@ class SymbolManager {
569
566
template <typename SymExprT, typename ... Args>
570
567
const SymExprT *acquire (Args &&...args);
571
568
572
- const SymbolConjured *conjureSymbol (CFGBlock:: ConstCFGElementRef ElemRef ,
569
+ const SymbolConjured *conjureSymbol (ConstCFGElementRef Elem ,
573
570
const LocationContext *LCtx, QualType T,
574
571
unsigned VisitCount,
575
572
const void *SymbolTag = nullptr ) {
576
573
577
- return acquire<SymbolConjured>(ElemRef , LCtx, T, VisitCount, SymbolTag);
574
+ return acquire<SymbolConjured>(Elem , LCtx, T, VisitCount, SymbolTag);
578
575
}
579
576
580
577
QualType getType (const SymExpr *SE) const {
0 commit comments