r367875 - Undo what looks like an unintentional change in r367829
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 5 08:23:10 PDT 2019
Author: nico
Date: Mon Aug 5 08:23:10 2019
New Revision: 367875
URL: http://llvm.org/viewvc/llvm-project?rev=367875&view=rev
Log:
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.
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=367875&r1=367874&r2=367875&view=diff
==============================================================================
--- cfe/trunk/include/clang/CrossTU/CrossTranslationUnit.h (original)
+++ cfe/trunk/include/clang/CrossTU/CrossTranslationUnit.h Mon Aug 5 08:23:10 2019
@@ -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
More information about the cfe-commits
mailing list