If a macro has been #undef'd in a precompiled header, we still need to
authorDouglas Gregor <dgregor@apple.com>
Tue, 9 Oct 2012 16:01:50 +0000 (16:01 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 9 Oct 2012 16:01:50 +0000 (16:01 +0000)
commit8cb174654fa508a759e11fda7b2ca8c15efe9cae
tree1ba673ed54f793b8fd441868733515bd4cbd4002
parent97e5949068f77dbc0569c9bc9813d789ed4b299b
If a macro has been #undef'd in a precompiled header, we still need to
write out the macro history for that macro. Similarly, we need to cope
with reading a macro definition that has been #undef'd.

Take advantage of this new ability so that global code-completion
results can refer to #undef'd macros, rather than losing them
entirely. For multiply defined/#undef'd macros, we will still get the
wrong result, but it's better than getting no result.

llvm-svn: 165502
clang/include/clang/Basic/IdentifierTable.h
clang/lib/Sema/SemaCodeComplete.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/test/Index/complete-macros.c