# HG changeset patch # User Shinji KONO # Date 1591022463 -32400 # Node ID 9b4cb9bbd23d2656e987070910adc48e0c4d8858 # Parent 2ba137afec0fef085560890fe39eb12863076ef6 ... diff -r 2ba137afec0f -r 9b4cb9bbd23d clang/lib/Parse/ParseCbC.cpp --- a/clang/lib/Parse/ParseCbC.cpp Mon Jun 01 19:08:20 2020 +0900 +++ b/clang/lib/Parse/ParseCbC.cpp Mon Jun 01 23:41:03 2020 +0900 @@ -296,7 +296,9 @@ LHSToken.setKind(tok::annot_primary_expr); ExternalSpace::StatementFilterCCC Validator(Next); Sema::NameClassification Classification = Actions.ClassifyName(getCurScope(), SS, LHSII, Loc, Next, SS.isEmpty() ? &Validator : nullptr); - setExprAnnotation(LHSToken, Classification.getExpression()); + if (LHSToken.getKind() != tok::annot_primary_expr) { + setExprAnnotation(LHSToken, Classification.getExpression()); + } LHSToken.setAnnotationEndLoc(Loc); PP.AnnotateCachedTokens(LHSToken); @@ -993,12 +995,8 @@ Token TokAfterGoto = Tok; Stmtsp = &Stmts; - ParsedStmtContext SubStmtCtx = ParsedStmtContext::Compound | ParsedStmtContext::InStmtExpr; // unconfident - - - gotoRes = ParseStatementOrDeclaration(Stmts, SubStmtCtx); if (gotoRes.get() == NULL) diff -r 2ba137afec0f -r 9b4cb9bbd23d clang/lib/Parse/ParseStmt.cpp --- a/clang/lib/Parse/ParseStmt.cpp Mon Jun 01 19:08:20 2020 +0900 +++ b/clang/lib/Parse/ParseStmt.cpp Mon Jun 01 23:41:03 2020 +0900 @@ -265,7 +265,6 @@ break; case tok::kw_for: // C99 6.8.5.3: for-statement return ParseForStatement(TrailingElseLoc); - case tok::kw_goto: // C99 6.8.6.1: goto-statement #ifndef noCbC { @@ -273,11 +272,9 @@ if (!(Next.is(tok::identifier) && PP.LookAhead(1).is(tok::semi)) && // C: 'goto' identifier ';' Next.isNot(tok::star)) { // C: 'goto' '*' expression ';' SemiError = "goto code segment"; - if(Next.is(tok::identifier) && NeedPrototypeDeclaration(Next)){ // Probably, direct continuation. goto csName(); CreatePrototypeDeclaration(); } - return ParseCbCGotoStatement(Attrs, Stmts); // CbC: goto codesegment statement } }