@@ -202,7 +202,11 @@ namespace {
202
202
#else
203
203
void checkEndFunction (CheckerContext &Ctx) const ;
204
204
#endif
205
+ #if LLVM_VERSION_MAJOR >= 9
206
+ bool evalCall (const CallEvent &Call, CheckerContext &C) const ;
207
+ #else
205
208
bool evalCall (const CallExpr *CE, CheckerContext &C) const ;
209
+ #endif
206
210
void checkPreCall (const CallEvent &Call, CheckerContext &C) const ;
207
211
void checkPostCall (const CallEvent &Call, CheckerContext &C) const ;
208
212
void checkPostStmt (const CStyleCastExpr *CE, CheckerContext &C) const ;
@@ -1216,10 +1220,17 @@ void GCChecker::checkPreCall(const CallEvent &Call, CheckerContext &C) const {
1216
1220
}
1217
1221
}
1218
1222
1223
+ #if LLVM_VERSION_MAJOR >= 9
1224
+ bool GCChecker::evalCall (const CallEvent &Call,
1225
+ #else
1219
1226
bool GCChecker::evalCall (const CallExpr *CE,
1227
+ #endif
1220
1228
CheckerContext &C) const {
1221
1229
// These checks should have no effect on the surrounding environment
1222
1230
// (globals should not be invalidated, etc), hence the use of evalCall.
1231
+ #if LLVM_VERSION_MAJOR >= 9
1232
+ const CallExpr *CE = dyn_cast<CallExpr>(Call.getOriginExpr ());
1233
+ #endif
1223
1234
unsigned CurrentDepth = C.getState ()->get <GCDepth>();
1224
1235
auto name = C.getCalleeName (CE);
1225
1236
SValExplainer Ex (C.getASTContext ());
0 commit comments