From: Nico Weber Date: Mon, 5 Aug 2019 19:35:59 +0000 (+0000) Subject: Fix another uninit read found by msan after r367829 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82f727cd26637c346bd942f1b36d8818410c321b;p=clang Fix another uninit read found by msan after r367829 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367912 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/CrossTU/CrossTranslationUnit.h b/include/clang/CrossTU/CrossTranslationUnit.h index c7d253be81..a712560790 100644 --- a/include/clang/CrossTU/CrossTranslationUnit.h +++ b/include/clang/CrossTU/CrossTranslationUnit.h @@ -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;