Internal checking is now enabled by the macro CHECK_INTERNAL

This commit is contained in:
PKEuS 2014-05-18 19:48:43 +02:00
parent e713ad45cb
commit 9cb544241d
4 changed files with 7 additions and 7 deletions

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NDEBUG
#ifdef CHECK_INTERNAL
#include "checkinternal.h"
#include "symboldatabase.h"
@ -315,4 +315,4 @@ void CheckInternal::redundantNextPreviousError(const Token* tok, const std::stri
"Call to 'Token::" + func1 + "()' followed by 'Token::" + func2 + "()' can be simplified.");
}
#endif // #ifndef NDEBUG
#endif // #ifdef CHECK_INTERNAL

View File

@ -84,7 +84,7 @@ std::string Settings::addEnabled(const std::string &str)
id.insert("information");
id.insert("missingInclude");
id.insert("unusedFunction");
#ifndef NDEBUG
#ifdef CHECK_INTERNAL
id.insert("internal");
#endif
}

View File

@ -71,7 +71,7 @@ private:
TEST_CASE(enabledPortability);
TEST_CASE(enabledUnusedFunction);
TEST_CASE(enabledMissingInclude);
#ifndef NDEBUG
#ifdef CHECK_INTERNAL
TEST_CASE(enabledInternal);
#endif
TEST_CASE(enabledMultiple);
@ -516,7 +516,7 @@ private:
ASSERT(settings.isEnabled("missingInclude"));
}
#ifndef NDEBUG
#ifdef CHECK_INTERNAL
void enabledInternal() {
REDIRECT;
const char *argv[] = {"cppcheck", "--enable=internal", "file.cpp"};

View File

@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NDEBUG
#ifdef CHECK_INTERNAL
#include "tokenize.h"
#include "checkinternal.h"
@ -340,4 +340,4 @@ private:
REGISTER_TEST(TestInternal)
#endif // #ifndef NDEBUG
#endif // #ifdef CHECK_INTERNAL