summaryrefslogtreecommitdiff
path: root/include/clang/CrossTU
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2019-08-05 15:23:10 +0000
committerNico Weber <nicolasweber@gmx.de>2019-08-05 15:23:10 +0000
commitafdf1013dc7653c345eccbcb4728663b351f2f39 (patch)
treef5c25f3dbfd2eba6822106d8686261aceaca5f1b /include/clang/CrossTU
parent0e2d6da234b539673a71b6b011827a075876cbe4 (diff)
downloadclang-afdf1013dc7653c345eccbcb4728663b351f2f39.tar.gz
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
Diffstat (limited to 'include/clang/CrossTU')
-rw-r--r--include/clang/CrossTU/CrossTranslationUnit.h6
1 files 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