1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-06-12 00:40:45 +08:00

7 Commits

Author SHA1 Message Date
Brad King
c1b575f4d1 clang-analyzer: rename from scan-build in comments 2021-06-03 14:59:55 -04:00
Oleksandr Koval
62d7acc6d4 cmCommandArgumentParserHelper: rework input handling
Old implementation uses involved Flex input management technique that
requires usage of obsolete YY_INPUT macro. This causes a lot of useless
allocations and byte-by-byte scanning. New implementation avoids those
hacks, it uses yy_scan_string() API to setup Flex input. Also it fixes
reporting of syntax error position and corresponding tests.
2020-09-09 15:49:35 +03:00
Sean McBride
b056bc3425 Fix most clang -Wextra-semi-stmt warnings in C++ files
Suppress one in code generated by flex.
2019-01-15 14:09:46 -05:00
Kyle Edwards
9e4b6bcbe8 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.
2019-01-14 10:31:38 -05:00
Rolf Eike Beer
576c079faa cmCommandArgumentParser: remove the variable tokens from the class
Make them local constants in the lexer file.
2017-10-25 19:56:33 +02:00
Matthias Maennich
d2e8351a4d cmCommandArgumentLexer: regenerate with flex 2.6.4 (previously 2.6.1)
flex 2.6.3 introduces symbol remapping through macro definitions. hence the
change appears bigger than one would expect from a minor version upgrade.

In addition some manual cleanup that had to be done previously is now
obsolete. namely:
  - the size_t cast of _yybytes_len in yy_scan_bytes
    (i is now also defined int and not size_t anymore)
  - the redefinition of yyl within yy_find_action
    (yyl is now already defined as int)

Line number preprocessor directives (#line) were previously generated into
the c source file. This actually breaks debugging as debuggers have a hard
time finding the original cmCommandArgumentLexer.in.l and mapping the current
instruction to a meaningful location within that file.

The prefix "cmCommandArgument_yy" can already be set as %option directly.

For convenience also provide a sed command for all the manual steps that
need to be done after generating.

Signed-off-by: Matthias Maennich <matthias@maennich.net>
2017-08-29 00:18:06 +02:00
Daniel Pfeifer
9bad0dfcce LexerParser: move to custom directory 2017-04-28 23:10:39 +02:00