]> granicus.if.org Git - clang/commitdiff
[analyzer] A speculative attempt to avoid gcc-7 crashes caused by r372942.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 26 Sep 2019 07:01:31 +0000 (07:01 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 26 Sep 2019 07:01:31 +0000 (07:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372945 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/Store.cpp

index b4ab6877726ce2754f8ed4696bf4051c61ab4d6b..5276789d20706079ea3592e63d688e98502c0ae1 100644 (file)
@@ -51,8 +51,11 @@ StoreRef StoreManager::enterStackFrame(Store OldStore,
   SmallVector<CallEvent::FrameBindingTy, 16> InitialBindings;
   Call.getInitialStackFrameContents(LCtx, InitialBindings);
 
-  for (const auto &I : InitialBindings)
-    Store = Bind(Store.getStore(), I.first.castAs<Loc>(), I.second);
+  for (const auto &I : InitialBindings) {
+    Loc L = I.first.castAs<Loc>();
+    SVal V = I.second;
+    Store = Bind(Store.getStore(), L, V);
+  }
 
   return Store;
 }