r367912 - Fix another uninit read found by msan after r367829
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 5 12:35:59 PDT 2019
Author: nico
Date: Mon Aug 5 12:35:59 2019
New Revision: 367912
URL: http://llvm.org/viewvc/llvm-project?rev=367912&view=rev
Log:
Fix another uninit read found by msan after r367829
Modified:
cfe/trunk/include/clang/CrossTU/CrossTranslationUnit.h
Modified: cfe/trunk/include/clang/CrossTU/CrossTranslationUnit.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/CrossTU/CrossTranslationUnit.h?rev=367912&r1=367911&r2=367912&view=diff
==============================================================================
--- cfe/trunk/include/clang/CrossTU/CrossTranslationUnit.h (original)
+++ cfe/trunk/include/clang/CrossTU/CrossTranslationUnit.h Mon Aug 5 12:35:59 2019
@@ -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;
More information about the cfe-commits
mailing list