]> granicus.if.org Git - clang/commit
Parse: Avoid crashing on unterminated top-level asm strings
authorJustin Bogner <mail@justinbogner.com>
Tue, 10 Dec 2013 21:29:48 +0000 (21:29 +0000)
committerJustin Bogner <mail@justinbogner.com>
Tue, 10 Dec 2013 21:29:48 +0000 (21:29 +0000)
commit6f5607388015fab9833103f881df8850b2c9bad6
tree181867997a57abe09dba049de27920b8e5a00ff0
parenta48dd5fc9f4adcef4e23851d164a57b7c0c95631
Parse: Avoid crashing on unterminated top-level asm strings

When parsing invalid top-level asm statements, we were ignoring the
return code of the SkipUntil we used for recovery. This led to crashes
when we hit the end of file and tried to continue parsing anyway.

This fixes the crash and adds a couple of tests for parsing related
problems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196961 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Parse/Parser.cpp
test/Parser/asm.c