[PCH/preamble] Make sure that if the preamble/PCH was serialized with errors that...
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 13 Jul 2016 20:35:26 +0000 (20:35 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Wed, 13 Jul 2016 20:35:26 +0000 (20:35 +0000)
commitdc0545b300c137ece52da033095c277b6cd81467
tree10221e462c30e4bd054a3e42a4b05aa89bc6c01a
parentba772321020183f28e94acb3aa84724dbc31041f
[PCH/preamble] Make sure that if the preamble/PCH was serialized with errors that we set diagnostic engine state appropriately.

Otherwise there can be a crash with CFG analysis warnings doing work on invalid AST.

Fixes crash of rdar://26224134

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@275313 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/DiagnosticIDs.cpp
lib/Frontend/ASTUnit.cpp
lib/Frontend/ChainedIncludesSource.cpp
lib/Sema/AnalysisBasedWarnings.cpp
lib/Serialization/ASTReader.cpp
lib/Serialization/GeneratePCH.cpp
test/Index/pch-warn-as-error-code-split.cpp [new file with mode: 0644]
test/Index/pch-warn-as-error-code-split.h [new file with mode: 0644]
test/Index/pch-warn-as-error-code.cpp [new file with mode: 0644]
test/PCH/chain-invalid-code.cpp [new file with mode: 0644]