summaryrefslogtreecommitdiffstats
path: root/Source/LexerParser/cmExprLexer.cxx
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-01-11 23:30:13 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-01-14 15:31:38 (GMT)
commit9e4b6bcbe8f4d3bf495650309b94b045a3c3d7fe (patch)
tree939aff202e2da93edceda890091dd16161fbbee5 /Source/LexerParser/cmExprLexer.cxx
parent613323a78bf33e22f510e41c8733fe2bc8df606a (diff)
downloadCMake-9e4b6bcbe8f4d3bf495650309b94b045a3c3d7fe.zip
CMake-9e4b6bcbe8f4d3bf495650309b94b045a3c3d7fe.tar.gz
CMake-9e4b6bcbe8f4d3bf495650309b94b045a3c3d7fe.tar.bz2
Source/LexerParser: Suppress "Use of zero-allocated memory" warning
clang scan-build warns about YY_CURRENT_BUFFER_LVALUE being zero- allocated, but the whole point of the macro is to know that it's not zero. Wrap the entire file in an "#ifndef __clang_analyzer__" block in order to suppress the warning.
Diffstat (limited to 'Source/LexerParser/cmExprLexer.cxx')
-rw-r--r--Source/LexerParser/cmExprLexer.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/LexerParser/cmExprLexer.cxx b/Source/LexerParser/cmExprLexer.cxx
index cb24687..fd0f745 100644
--- a/Source/LexerParser/cmExprLexer.cxx
+++ b/Source/LexerParser/cmExprLexer.cxx
@@ -664,6 +664,8 @@ Modify cmExprLexer.cxx:
/* IWYU pragma: no_forward_declare yyguts_t */
+#ifndef __clang_analyzer__ /* Suppress clang scan-build warnings */
+
#include "cmExprParserHelper.h"
/* Replace the lexer input function. */
@@ -2223,3 +2225,7 @@ void yyfree (void * ptr , yyscan_t yyscanner)
}
#define YYTABLES_NAME "yytables"
+
+/*--------------------------------------------------------------------------*/
+
+#endif /* __clang_analyzer__ */