]> granicus.if.org Git - clang/commit
[libclang] Fix crash when a #pragma diagnostic is included in the preamble.
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 3 Nov 2011 20:28:19 +0000 (20:28 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Thu, 3 Nov 2011 20:28:19 +0000 (20:28 +0000)
commite6825d39e89362105171c013f4018c4d1134ad6f
tree3b33674d3ae95a039b67acb6ad575e69dd1d621b
parent2c628646b8c0f5f285a38bf9a97900ee7e34e6c5
[libclang] Fix crash when a #pragma diagnostic is included in the preamble.

A PCH file keeps track of #pragma diagnostics state; when loading the preamble, they conflicted
with the #pragma diagnostic state already present in the DiagnosticsEngine object due to
parsing the preamble.

Fix this by clearing the state of the DiagnosticsEngine object.
Fixes rdar://10363572 && http://llvm.org/PR11254.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143644 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Frontend/ASTUnit.cpp
test/Index/pragma-diag-reparse.c