From afdf1013dc7653c345eccbcb4728663b351f2f39 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Mon, 5 Aug 2019 15:23:10 +0000 Subject: [PATCH] Undo what looks like an unintentional change in r367829 The MSan bot was (rightfully) complaining that NumASTLoaded was unitialized, so put the initialization removed in r367829 back in. While here, remove two needless semicolons added in that change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@367875 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/CrossTU/CrossTranslationUnit.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/clang/CrossTU/CrossTranslationUnit.h b/include/clang/CrossTU/CrossTranslationUnit.h index b6a199329a..c7d253be81 100644 --- a/include/clang/CrossTU/CrossTranslationUnit.h +++ b/include/clang/CrossTU/CrossTranslationUnit.h @@ -276,14 +276,14 @@ private: /// The number successfully loaded ASTs. Used to indicate, and - with the /// appropriate threshold value - limit the memory usage of the /// CrossTranslationUnitContext. - unsigned NumASTLoaded; + unsigned NumASTLoaded{0u}; /// RAII counter to signal 'threshold reached' condition, and to increment the /// NumASTLoaded counter upon a successful load. class LoadGuard { public: LoadGuard(unsigned Limit, unsigned &Counter) - : Counter(Counter), Enabled(Counter < Limit){}; + : Counter(Counter), Enabled(Counter < Limit) {} ~LoadGuard() { if (StoreSuccess) ++Counter; @@ -295,7 +295,7 @@ private: void storedSuccessfully() { StoreSuccess = true; } /// Indicates, whether a new load operation is permitted, it is within the /// threshold. - operator bool() const { return Enabled; }; + operator bool() const { return Enabled; } private: /// The number of ASTs actually imported. LoadGuard does not own the -- 2.40.0