diff 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
line wrap: on
line diff
--- a/clang/lib/Parse/Parser.cpp	Tue Jun 08 06:08:56 2021 +0900
+++ b/clang/lib/Parse/Parser.cpp	Tue Jun 08 06:36:09 2021 +0900
@@ -68,6 +68,9 @@
   PP.addCommentHandler(CommentSemaHandler.get());
 
   PP.setCodeCompletionHandler(*this);
+#ifndef noCbC
+  UniqueId = 0; // for CreateUniqueIdentifier()
+#endif
 }
 
 DiagnosticBuilder Parser::Diag(SourceLocation Loc, unsigned DiagID) {
@@ -610,6 +613,10 @@
   if (PP.isIncrementalProcessingEnabled() && Tok.is(tok::eof))
     ConsumeToken();
 
+#ifndef noCbC
+    CheckTheSjHeader();
+#endif
+
   Result = nullptr;
   switch (Tok.getKind()) {
   case tok::annot_pragma_unused:
@@ -1372,6 +1379,9 @@
   if (LateParsedAttrs)
     ParseLexedAttributeList(*LateParsedAttrs, Res, false, true);
 
+#ifndef noCbC
+  curFuncName = D.getIdentifier()->getName().data();
+#endif
   return ParseFunctionStatementBody(Res, BodyScope);
 }