summaryrefslogtreecommitdiffstats
path: root/clang/include/clang/Parse/Parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/include/clang/Parse/Parser.h')
-rw-r--r--clang/include/clang/Parse/Parser.h51
1 files changed, 27 insertions, 24 deletions
diff --git a/clang/include/clang/Parse/Parser.h b/clang/include/clang/Parse/Parser.h
index 4a25c70956a..8f136f4f443 100644
--- a/clang/include/clang/Parse/Parser.h
+++ b/clang/include/clang/Parse/Parser.h
@@ -1447,7 +1447,7 @@ private:
bool isTokIdentifier_in() const;
- ParsedType ParseObjCTypeName(ObjCDeclSpec &DS, Declarator::TheContext Ctx,
+ ParsedType ParseObjCTypeName(ObjCDeclSpec &DS, DeclaratorContext Ctx,
ParsedAttributes *ParamAttrs);
void ParseObjCMethodRequirement();
Decl *ParseObjCMethodPrototype(
@@ -1920,15 +1920,16 @@ private:
bool ParsedForRangeDecl() { return !ColonLoc.isInvalid(); }
};
- DeclGroupPtrTy ParseDeclaration(unsigned Context, SourceLocation &DeclEnd,
+ DeclGroupPtrTy ParseDeclaration(DeclaratorContext Context,
+ SourceLocation &DeclEnd,
ParsedAttributesWithRange &attrs);
- DeclGroupPtrTy ParseSimpleDeclaration(unsigned Context,
+ DeclGroupPtrTy ParseSimpleDeclaration(DeclaratorContext Context,
SourceLocation &DeclEnd,
ParsedAttributesWithRange &attrs,
bool RequireSemi,
ForRangeInit *FRI = nullptr);
- bool MightBeDeclarator(unsigned Context);
- DeclGroupPtrTy ParseDeclGroup(ParsingDeclSpec &DS, unsigned Context,
+ bool MightBeDeclarator(DeclaratorContext Context);
+ DeclGroupPtrTy ParseDeclGroup(ParsingDeclSpec &DS, DeclaratorContext Context,
SourceLocation *DeclEnd = nullptr,
ForRangeInit *FRI = nullptr);
Decl *ParseDeclarationAfterDeclarator(Declarator &D,
@@ -1951,7 +1952,8 @@ private:
const ParsedTemplateInfo &TemplateInfo,
AccessSpecifier AS, DeclSpecContext DSC,
ParsedAttributesWithRange &Attrs);
- DeclSpecContext getDeclSpecContextFromDeclaratorContext(unsigned Context);
+ DeclSpecContext
+ getDeclSpecContextFromDeclaratorContext(DeclaratorContext Context);
void ParseDeclarationSpecifiers(DeclSpec &DS,
const ParsedTemplateInfo &TemplateInfo = ParsedTemplateInfo(),
AccessSpecifier AS = AS_none,
@@ -1965,7 +1967,7 @@ private:
DeclSpecContext DSC = DSC_normal);
void ParseObjCTypeQualifierList(ObjCDeclSpec &DS,
- Declarator::TheContext Context);
+ DeclaratorContext Context);
void ParseEnumSpecifier(SourceLocation TagLoc, DeclSpec &DS,
const ParsedTemplateInfo &TemplateInfo,
@@ -2161,8 +2163,8 @@ private:
public:
TypeResult ParseTypeName(SourceRange *Range = nullptr,
- Declarator::TheContext Context
- = Declarator::TypeNameContext,
+ DeclaratorContext Context
+ = DeclaratorContext::TypeNameContext,
AccessSpecifier AS = AS_none,
Decl **OwnedType = nullptr,
ParsedAttributes *Attrs = nullptr);
@@ -2512,20 +2514,21 @@ private:
void DiagnoseUnexpectedNamespace(NamedDecl *Context);
- DeclGroupPtrTy ParseNamespace(unsigned Context, SourceLocation &DeclEnd,
+ DeclGroupPtrTy ParseNamespace(DeclaratorContext Context,
+ SourceLocation &DeclEnd,
SourceLocation InlineLoc = SourceLocation());
- void ParseInnerNamespace(std::vector<SourceLocation>& IdentLoc,
- std::vector<IdentifierInfo*>& Ident,
- std::vector<SourceLocation>& NamespaceLoc,
- unsigned int index, SourceLocation& InlineLoc,
- ParsedAttributes& attrs,
+ void ParseInnerNamespace(std::vector<SourceLocation> &IdentLoc,
+ std::vector<IdentifierInfo *> &Ident,
+ std::vector<SourceLocation> &NamespaceLoc,
+ unsigned int index, SourceLocation &InlineLoc,
+ ParsedAttributes &attrs,
BalancedDelimiterTracker &Tracker);
- Decl *ParseLinkage(ParsingDeclSpec &DS, unsigned Context);
+ Decl *ParseLinkage(ParsingDeclSpec &DS, DeclaratorContext Context);
Decl *ParseExportDeclaration();
DeclGroupPtrTy ParseUsingDirectiveOrDeclaration(
- unsigned Context, const ParsedTemplateInfo &TemplateInfo,
+ DeclaratorContext Context, const ParsedTemplateInfo &TemplateInfo,
SourceLocation &DeclEnd, ParsedAttributesWithRange &attrs);
- Decl *ParseUsingDirective(unsigned Context,
+ Decl *ParseUsingDirective(DeclaratorContext Context,
SourceLocation UsingLoc,
SourceLocation &DeclEnd,
ParsedAttributes &attrs);
@@ -2544,8 +2547,8 @@ private:
}
};
- bool ParseUsingDeclarator(unsigned Context, UsingDeclarator &D);
- DeclGroupPtrTy ParseUsingDeclaration(unsigned Context,
+ bool ParseUsingDeclarator(DeclaratorContext Context, UsingDeclarator &D);
+ DeclGroupPtrTy ParseUsingDeclaration(DeclaratorContext Context,
const ParsedTemplateInfo &TemplateInfo,
SourceLocation UsingLoc,
SourceLocation &DeclEnd,
@@ -2729,16 +2732,16 @@ private:
// C++ 14: Templates [temp]
// C++ 14.1: Template Parameters [temp.param]
- Decl *ParseDeclarationStartingWithTemplate(unsigned Context,
+ Decl *ParseDeclarationStartingWithTemplate(DeclaratorContext Context,
SourceLocation &DeclEnd,
AccessSpecifier AS = AS_none,
AttributeList *AccessAttrs = nullptr);
- Decl *ParseTemplateDeclarationOrSpecialization(unsigned Context,
+ Decl *ParseTemplateDeclarationOrSpecialization(DeclaratorContext Context,
SourceLocation &DeclEnd,
AccessSpecifier AS,
AttributeList *AccessAttrs);
Decl *ParseSingleDeclarationAfterTemplate(
- unsigned Context,
+ DeclaratorContext Context,
const ParsedTemplateInfo &TemplateInfo,
ParsingDeclRAIIObject &DiagsFromParams,
SourceLocation &DeclEnd,
@@ -2782,7 +2785,7 @@ private:
bool ParseTemplateArgumentList(TemplateArgList &TemplateArgs);
ParsedTemplateArgument ParseTemplateTemplateArgument();
ParsedTemplateArgument ParseTemplateArgument();
- Decl *ParseExplicitInstantiation(unsigned Context,
+ Decl *ParseExplicitInstantiation(DeclaratorContext Context,
SourceLocation ExternLoc,
SourceLocation TemplateLoc,
SourceLocation &DeclEnd,
OpenPOWER on IntegriCloud