diff options
| -rw-r--r-- | cppcheck.suppress | 3 | ||||
| -rw-r--r-- | lexers/LexCPP.cxx | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/cppcheck.suppress b/cppcheck.suppress index 1d351d90b..ac9aad1ac 100644 --- a/cppcheck.suppress +++ b/cppcheck.suppress @@ -197,6 +197,9 @@ constVariable:scintilla/lexers/LexVHDL.cxx // bp.itBracket not actually redundant as needed by return statements
redundantAssignment:scintilla/lexers/LexCPP.cxx
+// Suppress everything in test example files
+*:scintilla/lexilla/test/examples/*
+
// Suppress everything in catch.hpp as won't be changing
*:scintilla/test/unit/catch.hpp
// For now, suppress all test source files as, since Catch 2, cppcheck shows many warnings showing
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 2fbbf7151..10e38c661 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -9,7 +9,6 @@ #include <cstdlib> #include <cassert> #include <cstring> -#include <cctype> #include <utility> #include <string> @@ -1160,9 +1159,9 @@ void SCI_METHOD LexerCPP::Lex(Sci_PositionU startPos, Sci_Position length, int i case SCE_C_REGEX: if (sc.atLineStart) { sc.SetState(SCE_C_DEFAULT|activitySet); - } else if (! inRERange && sc.ch == '/') { + } else if (!inRERange && sc.ch == '/') { sc.Forward(); - while ((sc.ch < 0x80) && islower(sc.ch)) + while (IsLowerCase(sc.ch)) sc.Forward(); // gobble regex flags sc.SetState(SCE_C_DEFAULT|activitySet); } else if (sc.ch == '\\' && ((sc.currentPos+1) < lineEndNext)) { |
