llvm-project/clang/unittests/Lex
Vedant Kumar 95a2a7f2a1 [Lexer] Don't merge macro args from different macro files
The lexer sets the end location of macro arguments incorrectly *if*,
while merging consecutive args to fit into a single SLocEntry, it finds
args which come from different macro files.

Fix the issue by using separate SLocEntries in this situation.

This fixes a code coverage crasher (rdar://problem/26181005). Because
the lexer reported end locations for certain macro args incorrectly, we
would generate bogus coverage mappings with negative line offsets.

Reviewed-by: akyrtzi

Differential Revision: http://reviews.llvm.org/D20401

llvm-svn: 270160
2016-05-19 23:44:02 +00:00
..
CMakeLists.txt Basic: move CodeGenOptions from Frontend 2016-04-07 17:49:44 +00:00
HeaderMapTest.cpp Lex: Return "" when HeaderMap::lookupFilename fails 2016-02-23 00:48:16 +00:00
LexerTest.cpp [Lexer] Don't merge macro args from different macro files 2016-05-19 23:44:02 +00:00
PPCallbacksTest.cpp [VFS] Use VFS instead of virtual files in PPCallbacks test. 2015-10-08 14:20:14 +00:00
PPConditionalDirectiveRecordTest.cpp Make TargetInfo store an actual DataLayout instead of a string. 2016-03-04 19:00:41 +00:00