This is an archive of the discontinued LLVM Phabricator instance.

[clang-scan-deps] Skip UTF-8 BOM in source minimizer
ClosedPublic

Authored by aganea on Aug 20 2019, 6:42 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

aganea created this revision.Aug 20 2019, 6:42 PM
This revision is now accepted and ready to land.Aug 23 2019, 10:00 AM
dexonsmith added inline comments.Aug 23 2019, 10:03 AM
lib/Lex/DependencyDirectivesSourceMinimizer.cpp
822 ↗(On Diff #216311)

Is skipping this the right thing, or should it also be copied to the output?

aganea marked an inline comment as done.Aug 24 2019, 10:27 AM
aganea added inline comments.
lib/Lex/DependencyDirectivesSourceMinimizer.cpp
822 ↗(On Diff #216311)

The code in Lexer::InitLexer() assumes the files are always encoded as UTF-8, it simply skips over the BOM like we do here.

dexonsmith accepted this revision.Aug 24 2019, 12:20 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 26 2019, 5:13 PM