[PATCH] D65906: [clang-scan-deps] Fix edge cases in the minimizer

Alexandre Ganea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 7 14:25:41 PDT 2019


aganea created this revision.
aganea added reviewers: arphaman, dexonsmith, Bigcheese.
aganea added a project: clang.
Herald added a subscriber: tschuett.

This patch fixes:

1. Invisible characters that come just before #include, such as #ifndef. ( were hidden, depending on the display locale). I choose to simply skip over non-ASCII characters.
2. Double slashes in #include directive with angle brackets not handled correctly: #include <dir//file.h>
3. #error directive with quoted, multi-line content, along with CR+LF line endings wasn't handled correctly.


Repository:
  rC Clang

https://reviews.llvm.org/D65906

Files:
  lib/Lex/DependencyDirectivesSourceMinimizer.cpp
  test/Lexer/minimize_source_to_dependency_directives_include.c
  test/Lexer/minimize_source_to_dependency_directives_invalid_chars.c
  test/Lexer/minimize_source_to_dependency_directives_invalid_error.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65906.214002.patch
Type: text/x-patch
Size: 5600 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190807/659605e6/attachment.bin>


More information about the cfe-commits mailing list