Skip to content

Commit 504b9d7

Browse files
committed
CheckUnusedFunctions: made check() private
1 parent 1c7c8f0 commit 504b9d7

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

lib/checkunusedfunctions.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ namespace CTU {
4444
/// @{
4545

4646
class CPPCHECKLIB CheckUnusedFunctions : public Check {
47+
friend class TestUnusedFunctions;
48+
4749
public:
4850
/** @brief This constructor is used when registering the CheckUnusedFunctions */
4951
CheckUnusedFunctions() : Check(myName()) {}
@@ -61,9 +63,6 @@ class CPPCHECKLIB CheckUnusedFunctions : public Check {
6163

6264
static void parseTokens(const Tokenizer *tokenizer, const Settings *settings);
6365

64-
// Return true if an error is reported.
65-
bool check(ErrorLogger * const errorLogger, const Settings& settings) const;
66-
6766
/** @brief Parse current TU and extract file info */
6867
Check::FileInfo *getFileInfo(const Tokenizer *tokenizer, const Settings *settings) const override;
6968

@@ -80,6 +79,9 @@ class CPPCHECKLIB CheckUnusedFunctions : public Check {
8079
}
8180

8281
private:
82+
// Return true if an error is reported.
83+
bool check(ErrorLogger * const errorLogger, const Settings& settings) const;
84+
8385
void getErrorMessages(ErrorLogger */*errorLogger*/, const Settings * /*settings*/) const override {}
8486

8587
void runChecks(const Tokenizer & /*tokenizer*/, ErrorLogger * /*errorLogger*/) override {}

0 commit comments

Comments
 (0)