]> granicus.if.org Git - clang/commit
Avoid a couple of assertions when preprocessing with modules
authorBen Langmuir <blangmuir@apple.com>
Wed, 10 Sep 2014 21:29:41 +0000 (21:29 +0000)
committerBen Langmuir <blangmuir@apple.com>
Wed, 10 Sep 2014 21:29:41 +0000 (21:29 +0000)
commitb1f0f8a086e46afd3385fbd1ae680668f59dde58
treeb57a8d762ddaa23dea0cd92e92f9f46120533d85
parent2e49ba2061833c78384d8a1a13d0127f31330425
Avoid a couple of assertions when preprocessing with modules

1. We were hitting the NextIsPrevious assertion because we were trying
to merge decl chains that were independent of each other because we had
no Sema object to allow them to find existing decls. This is fixed by
delaying loading the "preloaded" decls until Sema is available.

2. We were trying to get identifier info from an annotation token, which
asserts.  The fix is to special-case the module annotations in the
preprocessed output printer.

Fixed in a single commit because when you hit 1 you almost invariably
hit 2 as well.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@217550 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Serialization/ASTReader.h
lib/Frontend/PrintPreprocessedOutput.cpp
lib/Lex/TokenConcatenation.cpp
lib/Serialization/ASTReader.cpp
test/Modules/Inputs/diamond_left.h
test/Modules/Inputs/diamond_top.h
test/Modules/Inputs/preprocess-prefix.h [new file with mode: 0644]
test/Modules/preprocess.m [new file with mode: 0644]