]> granicus.if.org Git - clang/commit
Correctly handle reading locations from serialized diagnostics
authorJustin Bogner <mail@justinbogner.com>
Fri, 10 Oct 2014 22:20:26 +0000 (22:20 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 10 Oct 2014 22:20:26 +0000 (22:20 +0000)
commit62136e45499812f005a012443ad0bed920a91628
tree96b86c6dbacee3733bef2f5295ef9380c99aedcb
parent356de0fe6a992d808626ada693d3b89bf7b02f1a
Correctly handle reading locations from serialized diagnostics

When reading a serialized diagnostic location with no file ID, we were
failing to increment the cursor past the rest of the location. This
would lead to the flags and category always appearing blank in such
diagnostics.

This changes the function to unconditionally increment the cursor and
updates the test to check for the correct output instead of testing
that we were doing this wrong. I've also updated the error check to
check for the correct number of fields.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219538 91177308-0d34-0410-b5e6-96231b3b80d8
test/Misc/serialized-diags.m
tools/libclang/CXLoadedDiagnostic.cpp