]> granicus.if.org Git - clang/commitdiff
Fix another uninit read found by msan after r367829
authorNico Weber <nicolasweber@gmx.de>
Mon, 5 Aug 2019 19:35:59 +0000 (19:35 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 5 Aug 2019 19:35:59 +0000 (19:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367912 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/CrossTU/CrossTranslationUnit.h

index c7d253be81f6606bd8be5ddeb214eeb4d4de8b11..a712560790f62bef31be25203286802dfd90f326 100644 (file)
@@ -283,7 +283,7 @@ private:
   class LoadGuard {
   public:
     LoadGuard(unsigned Limit, unsigned &Counter)
-        : Counter(Counter), Enabled(Counter < Limit) {}
+        : Counter(Counter), Enabled(Counter < Limit), StoreSuccess(false) {}
     ~LoadGuard() {
       if (StoreSuccess)
         ++Counter;