]> granicus.if.org Git - clang/commitdiff
[analyzer] Avoid small vectors of non-default-constructibles.
authorArtem Dergachev <artem.dergachev@gmail.com>
Thu, 26 Sep 2019 06:33:21 +0000 (06:33 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Thu, 26 Sep 2019 06:33:21 +0000 (06:33 +0000)
Unconfuses certain compilers.

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

include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
lib/StaticAnalyzer/Core/Store.cpp

index 8d1a672bc6129b96ac4b934c6f4fa05652f102ac..fc1cc913882669f2c4922630b7b73a124cbe5431 100644 (file)
@@ -347,7 +347,7 @@ public:
   ProgramStateRef invalidateRegions(unsigned BlockCount,
                                     ProgramStateRef Orig = nullptr) const;
 
-  using FrameBindingTy = std::pair<Loc, SVal>;
+  using FrameBindingTy = std::pair<SVal, SVal>;
   using BindingsTy = SmallVectorImpl<FrameBindingTy>;
 
   /// Populates the given SmallVector with the bindings in the callee's stack
index 3cf616161c6697d0294b50e0ed073ca2ad267e85..b4ab6877726ce2754f8ed4696bf4051c61ab4d6b 100644 (file)
@@ -52,7 +52,7 @@ StoreRef StoreManager::enterStackFrame(Store OldStore,
   Call.getInitialStackFrameContents(LCtx, InitialBindings);
 
   for (const auto &I : InitialBindings)
-    Store = Bind(Store.getStore(), I.first, I.second);
+    Store = Bind(Store.getStore(), I.first.castAs<Loc>(), I.second);
 
   return Store;
 }