diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-08-02 17:33:11 +0000 |
commit | c7e70c433efc6953dc3888b9fbf9f3512d7da2b0 (patch) | |
tree | 27425930fc0c91650a7f3527fcac8e0f92907b90 /lib/Parse/ParseDecl.cpp | |
parent | 486754660bb926339aefcf012a3f848592babb8b (diff) | |
download | src-c7e70c433efc6953dc3888b9fbf9f3512d7da2b0.tar.gz src-c7e70c433efc6953dc3888b9fbf9f3512d7da2b0.zip |
Notes
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 4f6bb08bdc64..6e57c7bbba91 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -757,7 +757,7 @@ void Parser::ParseNullabilityTypeSpecifiers(ParsedAttributes &attrs) { if (!getLangOpts().ObjC1) Diag(AttrNameLoc, diag::ext_nullability) << AttrName; - attrs.addNew(AttrName, AttrNameLoc, nullptr, AttrNameLoc, nullptr, 0, + attrs.addNew(AttrName, AttrNameLoc, nullptr, AttrNameLoc, nullptr, 0, ParsedAttr::AS_Keyword); break; } @@ -867,7 +867,7 @@ VersionTuple Parser::ParseVersionTuple(SourceRange &Range) { StopAtSemi | StopBeforeMatch | StopAtCodeCompletion); return VersionTuple(); } - + // Warn if separators, be it '.' or '_', do not match. if (AfterMajorSeparator != AfterMinorSeparator) Diag(Tok, diag::warn_expected_consistent_version_separator); @@ -1047,7 +1047,7 @@ void Parser::ParseAvailabilityAttribute(IdentifierInfo &Availability, continue; } } - + SourceRange VersionRange; VersionTuple Version = ParseVersionTuple(VersionRange); @@ -1259,7 +1259,7 @@ void Parser::ParseObjCBridgeRelatedAttribute(IdentifierInfo &ObjCBridgeRelated, Diag(Tok, diag::err_expected) << tok::l_paren; return; } - + // Parse the related class name. if (Tok.isNot(tok::identifier)) { Diag(Tok, diag::err_objcbridge_related_expected_related_class); @@ -1292,7 +1292,7 @@ void Parser::ParseObjCBridgeRelatedAttribute(IdentifierInfo &ObjCBridgeRelated, SkipUntil(tok::r_paren, StopAtSemi); return; } - + // Parse instance method name. Also non-optional but empty string is // permitted. IdentifierLoc *InstanceMethod = nullptr; @@ -1303,14 +1303,14 @@ void Parser::ParseObjCBridgeRelatedAttribute(IdentifierInfo &ObjCBridgeRelated, SkipUntil(tok::r_paren, StopAtSemi); return; } - + // Closing ')'. if (T.consumeClose()) return; - + if (endLoc) *endLoc = T.getCloseLocation(); - + // Record this attribute attrs.addNew(&ObjCBridgeRelated, SourceRange(ObjCBridgeRelatedLoc, T.getCloseLocation()), @@ -2032,7 +2032,7 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec &DS, DeclsInGroup.push_back(FirstDecl); bool ExpectSemi = Context != DeclaratorContext::ForContext; - + // If we don't have a comma, it is either the end of the list (a ';') or an // error, bail out. SourceLocation CommaLoc; @@ -3815,7 +3815,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, PrevSpec, DiagID, Type.get(), Actions.getASTContext().getPrintingPolicy())) Diag(StartLoc, DiagID) << PrevSpec; - + DS.SetRangeEnd(EndLoc); } else { DS.SetTypeSpecError(); @@ -5627,7 +5627,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) { } else { AllowConstructorName = (D.getContext() == DeclaratorContext::MemberContext); - AllowDeductionGuide = + AllowDeductionGuide = (D.getContext() == DeclaratorContext::FileContext || D.getContext() == DeclaratorContext::MemberContext); } @@ -6082,13 +6082,13 @@ void Parser::ParseFunctionDeclarator(Declarator &D, LocalEndLoc = RParenLoc; EndLoc = RParenLoc; - // If there are attributes following the identifier list, parse them and + // If there are attributes following the identifier list, parse them and // prohibit them. MaybeParseCXX11Attributes(FnAttrs); ProhibitAttributes(FnAttrs); } else { if (Tok.isNot(tok::r_paren)) - ParseParameterDeclarationClause(D, FirstArgAttrs, ParamInfo, + ParseParameterDeclarationClause(D, FirstArgAttrs, ParamInfo, EllipsisLoc); else if (RequiresArg) Diag(Tok, diag::err_argument_required_after_attribute); @@ -6391,8 +6391,8 @@ void Parser::ParseParameterDeclarationClause( ParseDeclarationSpecifiers(DS); - // Parse the declarator. This is "PrototypeContext" or - // "LambdaExprParameterContext", because we must accept either + // Parse the declarator. This is "PrototypeContext" or + // "LambdaExprParameterContext", because we must accept either // 'declarator' or 'abstract-declarator' here. Declarator ParmDeclarator( DS, D.getContext() == DeclaratorContext::LambdaExprContext @@ -6484,7 +6484,7 @@ void Parser::ParseParameterDeclarationClause( } ParamInfo.push_back(DeclaratorChunk::ParamInfo(ParmII, - ParmDeclarator.getIdentifierLoc(), + ParmDeclarator.getIdentifierLoc(), Param, std::move(DefArgToks))); } |