From: Simon Pilgrim Date: Sat, 18 May 2019 11:42:19 +0000 (+0000) Subject: MIGChecker - assert we have a non-null LocationContext. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7442b5e3d6aaa8fbdfb5af802d815dcd73fc822d;p=clang MIGChecker - assert we have a non-null LocationContext. NFCI. Fixes scan-build warning. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361097 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/StaticAnalyzer/Checkers/MIGChecker.cpp b/lib/StaticAnalyzer/Checkers/MIGChecker.cpp index bca1750db5..6e7776bb48 100644 --- a/lib/StaticAnalyzer/Checkers/MIGChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/MIGChecker.cpp @@ -144,6 +144,8 @@ static const ParmVarDecl *getOriginParam(SVal V, CheckerContext &C, static bool isInMIGCall(CheckerContext &C) { const LocationContext *LC = C.getLocationContext(); + assert(LC && "Unknown location context"); + const StackFrameContext *SFC; // Find the top frame. while (LC) {