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.

llvm-svn: 367875

clang/include/clang/CrossTU/CrossTranslationUnit.h

index b6a1993..c7d253b 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