Mercurial > hg > CbC > CbC_llvm
diff clang/lib/Parse/Parser.cpp @ 152:e8a9b4f4d755
pull from 146
author | anatofuz |
---|---|
date | Wed, 11 Mar 2020 18:29:16 +0900 |
parents | 1d019706d866 |
children | f935e5e0dbe7 |
line wrap: on
line diff
--- a/clang/lib/Parse/Parser.cpp Fri Feb 14 15:12:50 2020 +0900 +++ b/clang/lib/Parse/Parser.cpp Wed Mar 11 18:29:16 2020 +0900 @@ -67,6 +67,9 @@ PP.addCommentHandler(CommentSemaHandler.get()); PP.setCodeCompletionHandler(*this); +#ifndef noCbC + UniqueId = 0; // for CreateUniqueIdentifier() +#endif } DiagnosticBuilder Parser::Diag(SourceLocation Loc, unsigned DiagID) { @@ -583,6 +586,10 @@ if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof)) ConsumeToken(); +#ifndef noCbC + CheckTheSjHeader(); +#endif + Result = nullptr; switch (Tok.getKind()) { case tok::annot_pragma_unused: @@ -1346,6 +1353,9 @@ if (LateParsedAttrs) ParseLexedAttributeList(*LateParsedAttrs, Res, false, true); +#ifndef noCbC + curFuncName = D.getIdentifier()->getName().data(); +#endif return ParseFunctionStatementBody(Res, BodyScope); }