]> granicus.if.org Git - clang/commitdiff
MIGChecker - assert we have a non-null LocationContext. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 18 May 2019 11:42:19 +0000 (11:42 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 18 May 2019 11:42:19 +0000 (11:42 +0000)
Fixes scan-build warning.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@361097 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/MIGChecker.cpp

index bca1750db55d40970be4ef8e55f9e610b9adbd86..6e7776bb484e5de341ec61ee1f155892518e1608 100644 (file)
@@ -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) {