1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-14 02:08:27 +08:00

clang-tidy: fix readability-redundant-access-specifiers warnings

This commit is contained in:
Ben Boeckel
2021-01-22 10:38:19 -05:00
parent cdfc4e3195
commit b3b6ede6a1
25 changed files with 0 additions and 42 deletions

View File

@@ -25,7 +25,6 @@ readability-*,\
-readability-inconsistent-declaration-parameter-name,\ -readability-inconsistent-declaration-parameter-name,\
-readability-magic-numbers,\ -readability-magic-numbers,\
-readability-named-parameter,\ -readability-named-parameter,\
-readability-redundant-access-specifiers,\
-readability-redundant-declaration,\ -readability-redundant-declaration,\
-readability-redundant-string-init,\ -readability-redundant-string-init,\
-readability-simplify-boolean-expr,\ -readability-simplify-boolean-expr,\

View File

@@ -17,7 +17,6 @@ class cmBase32Encoder
public: public:
static const char paddingChar = '='; static const char paddingChar = '=';
public:
cmBase32Encoder(); cmBase32Encoder();
~cmBase32Encoder() = default; ~cmBase32Encoder() = default;

View File

@@ -25,7 +25,6 @@ class cmDepends
public: public:
using DependencyMap = std::map<std::string, std::vector<std::string>>; using DependencyMap = std::map<std::string, std::vector<std::string>>;
public:
/** Instances need to know the build directory name and the relative /** Instances need to know the build directory name and the relative
path from the build directory to the target file. */ path from the build directory to the target file. */
cmDepends(cmLocalUnixMakefileGenerator3* lg = nullptr, cmDepends(cmLocalUnixMakefileGenerator3* lg = nullptr,

View File

@@ -24,7 +24,6 @@ protected:
std::string WorkspacePath; std::string WorkspacePath;
unsigned int CpuCount = 2; unsigned int CpuCount = 2;
protected:
std::string GetCodeLiteCompilerName(const cmMakefile* mf) const; std::string GetCodeLiteCompilerName(const cmMakefile* mf) const;
std::string GetConfigurationName(const cmMakefile* mf) const; std::string GetConfigurationName(const cmMakefile* mf) const;
std::string GetBuildCommand(const cmMakefile* mf, std::string GetBuildCommand(const cmMakefile* mf,

View File

@@ -44,7 +44,6 @@ private:
virtual bool Replay(std::vector<cmListFileFunction> functions, virtual bool Replay(std::vector<cmListFileFunction> functions,
cmExecutionStatus& status) = 0; cmExecutionStatus& status) = 0;
private:
cmListFileContext StartingContext; cmListFileContext StartingContext;
std::vector<cmListFileFunction> Functions; std::vector<cmListFileFunction> Functions;
unsigned int ScopeDepth = 1; unsigned int ScopeDepth = 1;

View File

@@ -89,7 +89,6 @@ private:
Result CheckGraph() const; Result CheckGraph() const;
void Initialize(); void Initialize();
private:
const cmGeneratorExpressionDAGChecker* const Parent; const cmGeneratorExpressionDAGChecker* const Parent;
cmGeneratorTarget const* Target; cmGeneratorTarget const* Target;
const std::string Property; const std::string Property;

View File

@@ -52,7 +52,6 @@ private:
std::string FixRelativePath(std::string const& filePath, PathRole role, std::string FixRelativePath(std::string const& filePath, PathRole role,
cmLocalGenerator* lg); cmLocalGenerator* lg);
private:
const std::string Input; const std::string Input;
const std::string Target; const std::string Target;
const std::unique_ptr<cmCompiledGeneratorExpression> OutputFileExpr; const std::unique_ptr<cmCompiledGeneratorExpression> OutputFileExpr;

View File

@@ -108,7 +108,6 @@ private:
std::vector<cmGeneratorExpressionEvaluatorVector>::const_iterator pit) std::vector<cmGeneratorExpressionEvaluatorVector>::const_iterator pit)
const; const;
private:
cmGeneratorExpressionEvaluatorVector IdentifierChildren; cmGeneratorExpressionEvaluatorVector IdentifierChildren;
std::vector<cmGeneratorExpressionEvaluatorVector> ParamChildren; std::vector<cmGeneratorExpressionEvaluatorVector> ParamChildren;
const char* StartContent; const char* StartContent;

View File

@@ -24,7 +24,6 @@ private:
void ParseContent(cmGeneratorExpressionEvaluatorVector&); void ParseContent(cmGeneratorExpressionEvaluatorVector&);
void ParseGeneratorExpression(cmGeneratorExpressionEvaluatorVector&); void ParseGeneratorExpression(cmGeneratorExpressionEvaluatorVector&);
private:
std::vector<cmGeneratorExpressionToken>::const_iterator it; std::vector<cmGeneratorExpressionToken>::const_iterator it;
const std::vector<cmGeneratorExpressionToken> Tokens; const std::vector<cmGeneratorExpressionToken> Tokens;
unsigned int NestingLevel; unsigned int NestingLevel;

View File

@@ -152,7 +152,6 @@ public:
bool IsGCCOnWindows() const { return this->UsingGCCOnWindows; } bool IsGCCOnWindows() const { return this->UsingGCCOnWindows; }
public:
cmGlobalNinjaGenerator(cmake* cm); cmGlobalNinjaGenerator(cmake* cm);
static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory() static std::unique_ptr<cmGlobalGeneratorFactory> NewFactory()
@@ -570,7 +569,6 @@ private:
bool DiagnosedCxxModuleSupport = false; bool DiagnosedCxxModuleSupport = false;
private:
void InitOutputPathPrefix(); void InitOutputPathPrefix();
std::string OutputPathPrefix; std::string OutputPathPrefix;

View File

@@ -52,7 +52,6 @@ private:
std::vector<std::string> ComputeLinkCmd(const std::string& config); std::vector<std::string> ComputeLinkCmd(const std::string& config);
std::vector<std::string> ComputeDeviceLinkCmd(); std::vector<std::string> ComputeDeviceLinkCmd();
private:
// Target name info. // Target name info.
cmGeneratorTarget::Names TargetNames(const std::string& config) const; cmGeneratorTarget::Names TargetNames(const std::string& config) const;
std::string TargetLinkLanguage(const std::string& config) const; std::string TargetLinkLanguage(const std::string& config) const;

View File

@@ -62,7 +62,6 @@ public:
private: private:
bool MustSkip(); bool MustSkip();
private:
cmGeneratorTarget* GT; cmGeneratorTarget* GT;
cmMakefile* Makefile; cmMakefile* Makefile;
cmLocalGenerator* LocalGenerator; cmLocalGenerator* LocalGenerator;

View File

@@ -111,7 +111,6 @@ private:
static bool Shell_ArgumentNeedsQuotes(cm::string_view in, int flags); static bool Shell_ArgumentNeedsQuotes(cm::string_view in, int flags);
static std::string Shell_GetArgument(cm::string_view in, int flags); static std::string Shell_GetArgument(cm::string_view in, int flags);
private:
cmStateSnapshot StateSnapshot; cmStateSnapshot StateSnapshot;
bool LinkScriptShell; bool LinkScriptShell;

View File

@@ -64,7 +64,6 @@ public:
/// @brief Maximum number of parallel threads/processes in a generator /// @brief Maximum number of parallel threads/processes in a generator
static unsigned int const ParallelMax; static unsigned int const ParallelMax;
public:
/// @brief Returns the generator name /// @brief Returns the generator name
static cm::string_view GeneratorName(GenT genType); static cm::string_view GeneratorName(GenT genType);
/// @brief Returns the generator name in upper case /// @brief Returns the generator name in upper case

View File

@@ -45,7 +45,6 @@ public:
std::string ui; std::string ui;
}; };
public:
cmQtAutoGenGlobalInitializer( cmQtAutoGenGlobalInitializer(
std::vector<std::unique_ptr<cmLocalGenerator>> const& localGenerators); std::vector<std::unique_ptr<cmLocalGenerator>> const& localGenerators);
~cmQtAutoGenGlobalInitializer(); ~cmQtAutoGenGlobalInitializer();
@@ -73,7 +72,6 @@ private:
std::string const& generator, std::string const& executable, std::string const& generator, std::string const& executable,
std::string& error); std::string& error);
private:
std::vector<std::unique_ptr<cmQtAutoGenInitializer>> Initializers_; std::vector<std::unique_ptr<cmQtAutoGenInitializer>> Initializers_;
std::map<cmLocalGenerator*, std::string> GlobalAutoGenTargets_; std::map<cmLocalGenerator*, std::string> GlobalAutoGenTargets_;
std::map<cmLocalGenerator*, std::string> GlobalAutoRccTargets_; std::map<cmLocalGenerator*, std::string> GlobalAutoRccTargets_;

View File

@@ -98,7 +98,6 @@ public:
, GenNameUpper(cmQtAutoGen::GeneratorNameUpper(gen)){}; , GenNameUpper(cmQtAutoGen::GeneratorNameUpper(gen)){};
}; };
public:
/** @return The detected Qt version and the required Qt major version. */ /** @return The detected Qt version and the required Qt major version. */
static std::pair<IntegerVersion, unsigned int> GetQtVersion( static std::pair<IntegerVersion, unsigned int> GetQtVersion(
cmGeneratorTarget const* genTarget); cmGeneratorTarget const* genTarget);
@@ -149,7 +148,6 @@ private:
bool GetQtExecutable(GenVarsT& genVars, const std::string& executable, bool GetQtExecutable(GenVarsT& genVars, const std::string& executable,
bool ignoreMissingTarget) const; bool ignoreMissingTarget) const;
private:
cmQtAutoGenGlobalInitializer* GlobalInitializer = nullptr; cmQtAutoGenGlobalInitializer* GlobalInitializer = nullptr;
cmGeneratorTarget* GenTarget = nullptr; cmGeneratorTarget* GenTarget = nullptr;
cmGlobalGenerator* GlobalGen = nullptr; cmGlobalGenerator* GlobalGen = nullptr;

View File

@@ -54,7 +54,6 @@ public:
private: private:
static std::string HeadLine(cm::string_view title); static std::string HeadLine(cm::string_view title);
private:
mutable std::mutex Mutex_; mutable std::mutex Mutex_;
unsigned int Verbosity_ = 0; unsigned int Verbosity_ = 0;
bool ColorOutput_ = false; bool ColorOutput_ = false;
@@ -79,7 +78,6 @@ public:
static bool FileDiffers(std::string const& filename, static bool FileDiffers(std::string const& filename,
std::string const& content); std::string const& content);
public:
// -- Constructors // -- Constructors
cmQtAutoGenerator(GenT genType); cmQtAutoGenerator(GenT genType);
virtual ~cmQtAutoGenerator(); virtual ~cmQtAutoGenerator();
@@ -140,7 +138,6 @@ public:
private: private:
std::string ConfigKey(cm::string_view key) const; std::string ConfigKey(cm::string_view key) const;
private:
Json::Value Json_; Json::Value Json_;
cmQtAutoGenerator& Gen_; cmQtAutoGenerator& Gen_;
}; };

View File

@@ -55,7 +55,6 @@ public:
cmQtAutoMocUicT(cmQtAutoMocUicT const&) = delete; cmQtAutoMocUicT(cmQtAutoMocUicT const&) = delete;
cmQtAutoMocUicT& operator=(cmQtAutoMocUicT const&) = delete; cmQtAutoMocUicT& operator=(cmQtAutoMocUicT const&) = delete;
public:
// -- Types // -- Types
/** Include string with sub parts. */ /** Include string with sub parts. */
@@ -112,7 +111,6 @@ public:
using FileHandleT = std::shared_ptr<FileT>; using FileHandleT = std::shared_ptr<FileT>;
using GetOrInsertT = std::pair<FileHandleT, bool>; using GetOrInsertT = std::pair<FileHandleT, bool>;
public:
ParseCacheT(); ParseCacheT();
~ParseCacheT(); ~ParseCacheT();
@@ -135,7 +133,6 @@ public:
{ {
} }
public:
std::string FileName; std::string FileName;
cmFileTime FileTime; cmFileTime FileTime;
ParseCacheT::FileHandleT ParseData; ParseCacheT::FileHandleT ParseData;
@@ -266,7 +263,6 @@ public:
std::vector<std::string> Options; std::vector<std::string> Options;
}; };
public:
UicSettingsT(); UicSettingsT();
~UicSettingsT(); ~UicSettingsT();
@@ -379,7 +375,6 @@ public:
void MocIncludes(); void MocIncludes();
void UicIncludes(); void UicIncludes();
protected:
SourceFileHandleT FileHandle; SourceFileHandleT FileHandle;
std::string Content; std::string Content;
}; };
@@ -572,7 +567,6 @@ private:
static std::vector<std::string> dependenciesFromDepFile( static std::vector<std::string> dependenciesFromDepFile(
const char* filePath); const char* filePath);
private:
// -- Settings // -- Settings
BaseSettingsT BaseConst_; BaseSettingsT BaseConst_;
BaseEvalT BaseEval_; BaseEvalT BaseEval_;

View File

@@ -52,7 +52,6 @@ private:
bool GenerateRcc(); bool GenerateRcc();
bool GenerateWrapper(); bool GenerateWrapper();
private:
// -- Config settings // -- Config settings
bool MultiConfig_ = false; bool MultiConfig_ = false;
// -- Directories // -- Directories

View File

@@ -97,7 +97,6 @@ private:
void ComputeRelativePathTopSource(); void ComputeRelativePathTopSource();
void ComputeRelativePathTopBinary(); void ComputeRelativePathTopBinary();
private:
cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator
DirectoryState; DirectoryState;
cmStateSnapshot Snapshot_; cmStateSnapshot Snapshot_;

View File

@@ -209,7 +209,6 @@ public:
TLLCommands; TLLCommands;
cmListFileBacktrace Backtrace; cmListFileBacktrace Backtrace;
public:
bool CheckImportedLibName(std::string const& prop, bool CheckImportedLibName(std::string const& prop,
std::string const& value) const; std::string const& value) const;

View File

@@ -288,6 +288,5 @@ private:
const char* GetPrefixVariableInternal( const char* GetPrefixVariableInternal(
cmStateEnums::ArtifactType artifact) const; cmStateEnums::ArtifactType artifact) const;
private:
std::unique_ptr<cmTargetInternals> impl; std::unique_ptr<cmTargetInternals> impl;
}; };

View File

@@ -31,7 +31,6 @@ public:
/// On error the ssize_t argument is a non zero libuv error code /// On error the ssize_t argument is a non zero libuv error code
using EndFunction = std::function<void(ssize_t)>; using EndFunction = std::function<void(ssize_t)>;
public:
/** /**
* Reset to construction state * Reset to construction state
*/ */
@@ -65,7 +64,6 @@ private:
uv_buf_t* buf); uv_buf_t* buf);
static void UVData(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf); static void UVData(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf);
private:
cm::uv_pipe_ptr UVPipe_; cm::uv_pipe_ptr UVPipe_;
std::vector<char> Buffer_; std::vector<char> Buffer_;
DataFunction DataFunction_; DataFunction DataFunction_;
@@ -154,7 +152,6 @@ public:
bool MergedOutput = false; bool MergedOutput = false;
}; };
public:
// -- Const accessors // -- Const accessors
SetupT const& Setup() const { return this->Setup_; } SetupT const& Setup() const { return this->Setup_; }
cmWorkerPool::ProcessResultT* Result() const { return this->Setup_.Result; } cmWorkerPool::ProcessResultT* Result() const { return this->Setup_.Result; }
@@ -176,7 +173,6 @@ private:
void UVPipeErrEnd(ssize_t error); void UVPipeErrEnd(ssize_t error);
void UVTryFinish(); void UVTryFinish();
private:
// -- Setup // -- Setup
SetupT Setup_; SetupT Setup_;
// -- Runtime // -- Runtime
@@ -407,7 +403,6 @@ private:
static void UVProcessStart(uv_async_t* handle); static void UVProcessStart(uv_async_t* handle);
void UVProcessFinished(); void UVProcessFinished();
private:
// -- Process management // -- Process management
struct struct
{ {
@@ -520,7 +515,6 @@ public:
static void UVSlotBegin(uv_async_t* handle); static void UVSlotBegin(uv_async_t* handle);
static void UVSlotEnd(uv_async_t* handle); static void UVSlotEnd(uv_async_t* handle);
public:
// -- UV loop // -- UV loop
#ifdef CMAKE_UV_SIGNAL_HACK #ifdef CMAKE_UV_SIGNAL_HACK
std::unique_ptr<cmUVSignalHackRAII> UVHackRAII; std::unique_ptr<cmUVSignalHackRAII> UVHackRAII;

View File

@@ -117,7 +117,6 @@ public:
this->Process(); this->Process();
} }
private:
cmWorkerPool* Pool_ = nullptr; cmWorkerPool* Pool_ = nullptr;
unsigned int WorkerIndex_ = 0; unsigned int WorkerIndex_ = 0;
bool Fence_ = false; bool Fence_ = false;
@@ -154,7 +153,6 @@ public:
void Process() override { this->Pool()->Abort(); } void Process() override { this->Pool()->Abort(); }
}; };
public:
// -- Methods // -- Methods
cmWorkerPool(); cmWorkerPool();
~cmWorkerPool(); ~cmWorkerPool();

View File

@@ -75,7 +75,6 @@ private:
void CloseStartElement(); void CloseStartElement();
private:
static cmXMLSafe SafeAttribute(const char* value) { return { value }; } static cmXMLSafe SafeAttribute(const char* value) { return { value }; }
static cmXMLSafe SafeAttribute(std::string const& value) static cmXMLSafe SafeAttribute(std::string const& value)
@@ -121,7 +120,6 @@ private:
return value; return value;
} }
private:
std::ostream& Output; std::ostream& Output;
std::stack<std::string, std::vector<std::string>> Elements; std::stack<std::string, std::vector<std::string>> Elements;
std::string IndentationElement; std::string IndentationElement;