Skip to content

Commit ec17bfc

Browse files
committed
Fix #11604 Debug: DacaWrongData
1 parent 678290c commit ec17bfc

3 files changed

Lines changed: 0 additions & 16 deletions

File tree

lib/check.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ class Settings;
3939
class ErrorLogger;
4040
class Tokenizer;
4141

42-
/** Use WRONG_DATA in checkers to mark conditions that check that data is correct */
43-
#define WRONG_DATA(COND, TOK) ((COND) && wrongData((TOK), #COND))
44-
4542
/// @addtogroup Core
4643
/// @{
4744

lib/checkimpl.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,6 @@ void CheckImpl::reportError(ErrorPath errorPath, Severity severity, const char i
4040
mErrorLogger.reportErr(errmsg);
4141
}
4242

43-
bool CheckImpl::wrongData(const Token *tok, const char *str)
44-
{
45-
if (mSettings.daca)
46-
reportError(tok, Severity::debug, "DacaWrongData", "Wrong data detected by condition " + std::string(str));
47-
return true;
48-
}
49-
5043
ErrorPath CheckImpl::getErrorPath(const Token* errtok, const ValueFlow::Value* value, std::string bug) const
5144
{
5245
ErrorPath errorPath;

lib/checkimpl.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@ class CPPCHECKLIB CheckImpl
7272

7373
ErrorPath getErrorPath(const Token* errtok, const ValueFlow::Value* value, std::string bug) const;
7474

75-
/**
76-
* Use WRONG_DATA in checkers when you check for wrong data. That
77-
* will call this method
78-
*/
79-
bool wrongData(const Token *tok, const char *str);
80-
8175
public: // TODO: should be protected
8276
void logChecker(const char id[]);
8377
};

0 commit comments

Comments
 (0)