Lex: Add some unit tests for corrupt header maps
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 20 Feb 2016 20:39:51 +0000 (20:39 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 20 Feb 2016 20:39:51 +0000 (20:39 +0000)
commit9ab99eecc3c614a6fc74f8ee8fab05ef43a0d3e5
treeb6ce013cd24910350299fe4f94a65c948a9fc4d3
parent223838aea2aef2d08dc76bb19f76899342bb7086
Lex: Add some unit tests for corrupt header maps

Split the implementation of `HeaderMap` into `HeaderMapImpl` so that we
can write unit tests that don't depend on the `FileManager`, and then
write a few tests that cover the types of corrupt header maps already
detected.

This also moves type and constant definitions from HeaderMap.cpp to
HeaderMapTypes.h so that the test can access them.

llvm-svn: 261446
clang/include/clang/Lex/HeaderMap.h
clang/include/clang/Lex/HeaderMapTypes.h [new file with mode: 0644]
clang/lib/Lex/HeaderMap.cpp
clang/unittests/Lex/CMakeLists.txt
clang/unittests/Lex/HeaderMapTest.cpp [new file with mode: 0644]