]> granicus.if.org Git - clang/commitdiff
Undo what looks like an unintentional change in r367829
authorNico Weber <nicolasweber@gmx.de>
Mon, 5 Aug 2019 15:23:10 +0000 (15:23 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 5 Aug 2019 15:23:10 +0000 (15:23 +0000)
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

index b6a199329a728d5afb3655311e9e0d9f0e03d408..c7d253be81f6606bd8be5ddeb214eeb4d4de8b11 100644 (file)
@@ -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