diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-11 20:59:20 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-11 20:59:20 +0000 |
commit | 994d73f8473cb2cd3ce2f69c9575c95015be788a (patch) | |
tree | d6f95d3f1b8ed751e3d6c5485455411b26e81b48 /include | |
parent | 47f1165c92bc4104e314223ed9ad251e914687c1 (diff) |
Part of PR10101: after a parse error in a declaration, try harder to find the
right place to pick up parsing. In C++, this had a tendency to skip everything
declared within headers if the TU starts with garbage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154530 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/Parse/Parser.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index e599207c24..9d784c9e96 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -742,6 +742,10 @@ private: bool SkipUntil(ArrayRef<tok::TokenKind> Toks, bool StopAtSemi = true, bool DontConsume = false, bool StopAtCodeCompletion = false); + /// SkipMalformedDecl - Read tokens until we get to some likely good stopping + /// point for skipping past a simple-declaration. + void SkipMalformedDecl(); + //===--------------------------------------------------------------------===// // Lexing and parsing of C++ inline methods. |