comparison clang/lib/Parse/Parser.cpp @ 209:dd44ba33042e

merged...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:36:09 +0900
parents 2e18cbf3894f f935e5e0dbe7
children 292f64a68d8a
comparison
equal deleted inserted replaced
208:874d1390268d 209:dd44ba33042e
66 66
67 CommentSemaHandler.reset(new ActionCommentHandler(actions)); 67 CommentSemaHandler.reset(new ActionCommentHandler(actions));
68 PP.addCommentHandler(CommentSemaHandler.get()); 68 PP.addCommentHandler(CommentSemaHandler.get());
69 69
70 PP.setCodeCompletionHandler(*this); 70 PP.setCodeCompletionHandler(*this);
71 #ifndef noCbC
72 UniqueId = 0; // for CreateUniqueIdentifier()
73 #endif
71 } 74 }
72 75
73 DiagnosticBuilder Parser::Diag(SourceLocation Loc, unsigned DiagID) { 76 DiagnosticBuilder Parser::Diag(SourceLocation Loc, unsigned DiagID) {
74 return Diags.Report(Loc, DiagID); 77 return Diags.Report(Loc, DiagID);
75 } 78 }
608 // Skip over the EOF token, flagging end of previous input for incremental 611 // Skip over the EOF token, flagging end of previous input for incremental
609 // processing 612 // processing
610 if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof)) 613 if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof))
611 ConsumeToken(); 614 ConsumeToken();
612 615
616 #ifndef noCbC
617 CheckTheSjHeader();
618 #endif
619
613 Result = nullptr; 620 Result = nullptr;
614 switch (Tok.getKind()) { 621 switch (Tok.getKind()) {
615 case tok::annot_pragma_unused: 622 case tok::annot_pragma_unused:
616 HandlePragmaUnused(); 623 HandlePragmaUnused();
617 return false; 624 return false;
1370 1377
1371 // Late attributes are parsed in the same scope as the function body. 1378 // Late attributes are parsed in the same scope as the function body.
1372 if (LateParsedAttrs) 1379 if (LateParsedAttrs)
1373 ParseLexedAttributeList(*LateParsedAttrs, Res, false, true); 1380 ParseLexedAttributeList(*LateParsedAttrs, Res, false, true);
1374 1381
1382 #ifndef noCbC
1383 curFuncName = D.getIdentifier()->getName().data();
1384 #endif
1375 return ParseFunctionStatementBody(Res, BodyScope); 1385 return ParseFunctionStatementBody(Res, BodyScope);
1376 } 1386 }
1377 1387
1378 void Parser::SkipFunctionBody() { 1388 void Parser::SkipFunctionBody() {
1379 if (Tok.is(tok::equal)) { 1389 if (Tok.is(tok::equal)) {