diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-11-27 21:57:34 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-11-27 21:57:34 +0000 |
commit | d0b91de8c6efa0a43d6a13dbd791289938d08ab7 (patch) | |
tree | 53207c58baa6bb7df994b74c7dfa88cb3315cc8f /clang/lib/Parse/Parser.cpp | |
parent | 3430c25cccf887d29f98b783293bf5f18b21aef2 (diff) | |
download | bcm5719-llvm-d0b91de8c6efa0a43d6a13dbd791289938d08ab7.tar.gz bcm5719-llvm-d0b91de8c6efa0a43d6a13dbd791289938d08ab7.zip |
Move PrettyStackTraceParserEntry to ParseAST.cpp
r128056 moved PrettyStackTraceParserEntry construction from Parser.h
to ParseAST.cpp, so there's no need to keep this class in a header.
llvm-svn: 168731
Diffstat (limited to 'clang/lib/Parse/Parser.cpp')
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index dfffe8150f2..12cced13b6e 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -103,29 +103,6 @@ Parser::Parser(Preprocessor &pp, Sema &actions, bool skipFunctionBodies) PP.setCodeCompletionHandler(*this); } -/// If a crash happens while the parser is active, print out a line indicating -/// what the current token is. -void PrettyStackTraceParserEntry::print(raw_ostream &OS) const { - const Token &Tok = P.getCurToken(); - if (Tok.is(tok::eof)) { - OS << "<eof> parser at end of file\n"; - return; - } - - if (Tok.getLocation().isInvalid()) { - OS << "<unknown> parser at unknown location\n"; - return; - } - - const Preprocessor &PP = P.getPreprocessor(); - Tok.getLocation().print(OS, PP.getSourceManager()); - if (Tok.isAnnotation()) - OS << ": at annotation token \n"; - else - OS << ": current parser token '" << PP.getSpelling(Tok) << "'\n"; -} - - DiagnosticBuilder Parser::Diag(SourceLocation Loc, unsigned DiagID) { return Diags.Report(Loc, DiagID); } |