20 using namespace clang;
28 const ParsedTemplateInfo &TemplateInfo,
32 assert(Tok.
isOneOf(tok::l_brace, tok::colon, tok::kw_try, tok::equal) &&
33 "Current token not a '{', ':', '=', or 'try'!");
36 TemplateInfo.TemplateParams ? TemplateInfo.TemplateParams->data()
38 TemplateInfo.TemplateParams ? TemplateInfo.TemplateParams->size() : 0);
46 TemplateParams,
nullptr,
55 HandleMemberFunctionDeclDelays(D, FnD);
70 ? diag::warn_cxx98_compat_deleted_function
71 : diag::ext_deleted_function);
74 if (
auto *DeclAsFunction = dyn_cast<FunctionDecl>(FnD)) {
75 DeclAsFunction->setRangeEnd(KWEndLoc);
79 ? diag::warn_cxx98_compat_defaulted_function
80 : diag::ext_defaulted_function);
82 if (
auto *DeclAsFunction = dyn_cast<FunctionDecl>(FnD)) {
83 DeclAsFunction->setRangeEnd(KWEndLoc);
86 llvm_unreachable(
"function definition after = not 'delete' or 'default'");
89 if (Tok.
is(tok::comma)) {
90 Diag(KWLoc, diag::err_default_delete_in_multiple_declaration)
93 }
else if (ExpectAndConsume(tok::semi, diag::err_expected_after,
94 Delete ?
"delete" :
"default")) {
107 !(FnD && FnD->getAsFunction() &&
108 FnD->getAsFunction()->getReturnType()->getContainedAutoType()) &&
110 (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate &&
111 TemplateInfo.Kind != ParsedTemplateInfo::ExplicitSpecialization)) &&
115 LexTemplateFunctionForLateParsing(Toks);
128 LexedMethod* LM =
new LexedMethod(
this, FnD);
129 getCurrentClass().LateParsedDeclarations.push_back(LM);
136 if (ConsumeAndStoreFunctionPrologue(Toks)) {
143 delete getCurrentClass().LateParsedDeclarations.back();
144 getCurrentClass().LateParsedDeclarations.pop_back();
148 ConsumeAndStoreUntil(tok::r_brace, Toks,
false);
152 if (kind == tok::kw_try) {
153 while (Tok.
is(tok::kw_catch)) {
154 ConsumeAndStoreUntil(tok::l_brace, Toks,
false);
155 ConsumeAndStoreUntil(tok::r_brace, Toks,
false);
177 delete getCurrentClass().LateParsedDeclarations.back();
178 getCurrentClass().LateParsedDeclarations.pop_back();
188 void Parser::ParseCXXNonStaticMemberInitializer(
Decl *VarD) {
189 assert(Tok.
isOneOf(tok::l_brace, tok::equal) &&
190 "Current token not a '{' or '='!");
192 LateParsedMemberInitializer *MI =
193 new LateParsedMemberInitializer(
this, VarD);
194 getCurrentClass().LateParsedDeclarations.push_back(MI);
198 if (kind == tok::equal) {
203 if (kind == tok::l_brace) {
209 ConsumeAndStoreUntil(tok::r_brace, Toks,
true);
212 ConsumeAndStoreInitializer(Toks, CIK_DefaultInitializer);
225 Parser::LateParsedDeclaration::~LateParsedDeclaration() {}
226 void Parser::LateParsedDeclaration::ParseLexedMethodDeclarations() {}
227 void Parser::LateParsedDeclaration::ParseLexedMemberInitializers() {}
228 void Parser::LateParsedDeclaration::ParseLexedMethodDefs() {}
230 Parser::LateParsedClass::LateParsedClass(
Parser *
P, ParsingClass *
C)
231 : Self(P), Class(C) {}
233 Parser::LateParsedClass::~LateParsedClass() {
234 Self->DeallocateParsedClasses(Class);
237 void Parser::LateParsedClass::ParseLexedMethodDeclarations() {
238 Self->ParseLexedMethodDeclarations(*Class);
241 void Parser::LateParsedClass::ParseLexedMemberInitializers() {
242 Self->ParseLexedMemberInitializers(*Class);
245 void Parser::LateParsedClass::ParseLexedMethodDefs() {
246 Self->ParseLexedMethodDefs(*Class);
249 void Parser::LateParsedMethodDeclaration::ParseLexedMethodDeclarations() {
250 Self->ParseLexedMethodDeclaration(*
this);
253 void Parser::LexedMethod::ParseLexedMethodDefs() {
254 Self->ParseLexedMethodDef(*
this);
257 void Parser::LateParsedMemberInitializer::ParseLexedMemberInitializers() {
258 Self->ParseLexedMemberInitializer(*
this);
265 void Parser::ParseLexedMethodDeclarations(ParsingClass &Class) {
266 bool HasTemplateScope = !Class.TopLevelClass && Class.TemplateScope;
269 TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
270 if (HasTemplateScope) {
272 ++CurTemplateDepthTracker;
277 bool HasClassScope = !Class.TopLevelClass;
282 Class.TagOrTemplate);
284 for (
size_t i = 0; i < Class.LateParsedDeclarations.size(); ++i) {
285 Class.LateParsedDeclarations[i]->ParseLexedMethodDeclarations();
290 Class.TagOrTemplate);
293 void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) {
296 TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
297 if (LM.TemplateScope) {
299 ++CurTemplateDepthTracker;
308 for (
unsigned I = 0, N = LM.DefaultArgs.size(); I != N; ++I) {
309 auto Param = cast<ParmVarDecl>(LM.DefaultArgs[I].Param);
311 bool HasUnparsed = Param->hasUnparsedDefaultArg();
316 Token LastDefaultArgToken = Toks->back();
322 Toks->push_back(DefArgEnd);
325 Toks->push_back(Tok);
332 assert(Tok.
is(tok::equal) &&
"Default argument not starting with '='");
343 Diag(Tok, diag::warn_cxx98_compat_generalized_initializer_lists);
344 DefArgResult = ParseBraceInitializer();
355 assert(Toks->size() >= 3 &&
"expected a token in default arg");
358 (*Toks)[Toks->size() - 3].getLocation());
373 LM.DefaultArgs[I].Toks =
nullptr;
374 }
else if (HasUnparsed) {
375 assert(Param->hasInheritedDefaultArg());
376 FunctionDecl *Old = cast<FunctionDecl>(LM.Method)->getPreviousDecl();
381 Param->getUninstantiatedDefaultArg());
383 Param->setDefaultArg(OldParam->
getInit());
390 Token LastExceptionSpecToken = Toks->back();
391 Token ExceptionSpecEnd;
396 Toks->push_back(ExceptionSpecEnd);
399 Toks->push_back(Tok);
413 = dyn_cast<FunctionTemplateDecl>(LM.Method))
414 Method = cast<CXXMethodDecl>(FunTmpl->getTemplatedDecl());
416 Method = cast<CXXMethodDecl>(LM.Method);
419 Method->getTypeQualifiers(),
430 = tryParseExceptionSpecification(
false, SpecificationRange,
432 DynamicExceptionRanges, NoexceptExpr,
433 ExceptionSpecTokens);
442 DynamicExceptionRanges,
444 NoexceptExpr.
get() :
nullptr);
456 LM.ExceptionSpecTokens =
nullptr;
459 PrototypeScope.Exit();
468 void Parser::ParseLexedMethodDefs(ParsingClass &Class) {
469 bool HasTemplateScope = !Class.TopLevelClass && Class.TemplateScope;
471 TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
472 if (HasTemplateScope) {
474 ++CurTemplateDepthTracker;
476 bool HasClassScope = !Class.TopLevelClass;
480 for (
size_t i = 0; i < Class.LateParsedDeclarations.size(); ++i) {
481 Class.LateParsedDeclarations[i]->ParseLexedMethodDefs();
485 void Parser::ParseLexedMethodDef(LexedMethod &LM) {
488 TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
489 if (LM.TemplateScope) {
491 ++CurTemplateDepthTracker;
494 assert(!LM.Toks.empty() &&
"Empty body!");
495 Token LastBodyToken = LM.Toks.back();
501 LM.Toks.push_back(BodyEnd);
504 LM.Toks.push_back(Tok);
508 ConsumeAnyToken(
true);
509 assert(Tok.
isOneOf(tok::l_brace, tok::colon, tok::kw_try)
510 &&
"Inline method not starting with '{', ':' or 'try'");
517 if (Tok.
is(tok::kw_try)) {
518 ParseFunctionTryBlock(LM.D, FnScope);
527 if (Tok.
is(tok::colon)) {
528 ParseConstructorInitializer(LM.D);
531 if (!Tok.
is(tok::l_brace)) {
546 !isa<FunctionTemplateDecl>(LM.D) ||
547 cast<FunctionTemplateDecl>(LM.D)->getTemplateParameters()->getDepth()
548 < TemplateParameterDepth) &&
549 "TemplateParameterDepth should be greater than the depth of "
550 "current template being instantiated!");
552 ParseFunctionStatementBody(LM.D, FnScope);
556 LM.D->getAsFunction()->setLateTemplateParsed(
false);
564 if (
CXXMethodDecl *MD = dyn_cast_or_null<CXXMethodDecl>(LM.D))
571 void Parser::ParseLexedMemberInitializers(ParsingClass &Class) {
572 bool HasTemplateScope = !Class.TopLevelClass && Class.TemplateScope;
575 TemplateParameterDepthRAII CurTemplateDepthTracker(TemplateParameterDepth);
576 if (HasTemplateScope) {
578 ++CurTemplateDepthTracker;
581 bool AlreadyHasClassScope = Class.TopLevelClass;
583 ParseScope ClassScope(
this, ScopeFlags, !AlreadyHasClassScope);
584 ParseScopeFlags ClassScopeFlags(
this, ScopeFlags, AlreadyHasClassScope);
586 if (!AlreadyHasClassScope)
588 Class.TagOrTemplate);
590 if (!Class.LateParsedDeclarations.empty()) {
599 for (
size_t i = 0; i < Class.LateParsedDeclarations.size(); ++i) {
600 Class.LateParsedDeclarations[i]->ParseLexedMemberInitializers();
604 if (!AlreadyHasClassScope)
606 Class.TagOrTemplate);
611 void Parser::ParseLexedMemberInitializer(LateParsedMemberInitializer &MI) {
612 if (!MI.Field || MI.Field->isInvalidDecl())
617 MI.Toks.push_back(Tok);
621 ConsumeAnyToken(
true);
627 ExprResult Init = ParseCXXMemberInitializer(MI.Field,
false,
640 Diag(EndLoc, diag::err_expected_semi_decl_list);
660 bool StopAtSemi,
bool ConsumeFinalToken) {
663 bool isFirstTokenConsumed =
true;
666 if (Tok.
is(T1) || Tok.
is(T2)) {
667 if (ConsumeFinalToken) {
676 case tok::annot_module_begin:
677 case tok::annot_module_end:
678 case tok::annot_module_include:
686 ConsumeAndStoreUntil(tok::r_paren, Toks,
false);
692 ConsumeAndStoreUntil(tok::r_square, Toks,
false);
698 ConsumeAndStoreUntil(tok::r_brace, Toks,
false);
707 if (ParenCount && !isFirstTokenConsumed)
713 if (BracketCount && !isFirstTokenConsumed)
719 if (BraceCount && !isFirstTokenConsumed)
725 case tok::code_completion:
727 ConsumeCodeCompletionToken();
730 case tok::string_literal:
731 case tok::wide_string_literal:
732 case tok::utf8_string_literal:
733 case tok::utf16_string_literal:
734 case tok::utf32_string_literal:
736 ConsumeStringToken();
748 isFirstTokenConsumed =
false;
758 bool Parser::ConsumeAndStoreFunctionPrologue(
CachedTokens &Toks) {
759 if (Tok.
is(tok::kw_try)) {
764 if (Tok.
isNot(tok::colon)) {
770 ConsumeAndStoreUntil(tok::l_brace, tok::r_brace, Toks,
773 if (Tok.
isNot(tok::l_brace))
794 bool MightBeTemplateArgument =
false;
798 if (Tok.
is(tok::kw_decltype)) {
801 if (Tok.
isNot(tok::l_paren))
806 if (!ConsumeAndStoreUntil(tok::r_paren, Toks,
true)) {
808 Diag(OpenLoc, diag::note_matching) << tok::l_paren;
814 if (Tok.
is(tok::coloncolon)) {
818 if (Tok.
is(tok::kw_template)) {
824 if (Tok.
isOneOf(tok::identifier, tok::kw_template)) {
827 }
else if (Tok.
is(tok::code_completion)) {
829 ConsumeCodeCompletionToken();
833 MightBeTemplateArgument =
true;
838 }
while (Tok.
is(tok::coloncolon));
840 if (Tok.
is(tok::less))
841 MightBeTemplateArgument =
true;
843 if (MightBeTemplateArgument) {
850 if (!ConsumeAndStoreUntil(tok::l_paren, tok::l_brace, Toks,
857 }
else if (Tok.
isNot(tok::l_paren) && Tok.
isNot(tok::l_brace)) {
861 << tok::l_paren << tok::l_brace;
868 bool IsLParen = (kind == tok::l_paren);
874 assert(kind == tok::l_brace &&
"Must be left paren or brace here.");
885 tok::TokenKind CloseKind = IsLParen ? tok::r_paren : tok::r_brace;
886 if (!ConsumeAndStoreUntil(CloseKind, Toks,
true)) {
887 Diag(Tok, diag::err_expected) << CloseKind;
888 Diag(OpenLoc, diag::note_matching) <<
kind;
893 if (Tok.
is(tok::ellipsis)) {
900 if (Tok.
is(tok::comma)) {
903 }
else if (Tok.
is(tok::l_brace)) {
921 }
else if (!MightBeTemplateArgument) {
922 return Diag(Tok.
getLocation(), diag::err_expected_either) << tok::l_brace
930 bool Parser::ConsumeAndStoreConditional(
CachedTokens &Toks) {
932 assert(Tok.
is(tok::question));
936 while (Tok.
isNot(tok::colon)) {
937 if (!ConsumeAndStoreUntil(tok::question, tok::colon, Toks,
943 if (Tok.
is(tok::question) && !ConsumeAndStoreConditional(Toks))
958 : TentativeParsingAction(Self), Self(Self), EndKind(EndKind) {
961 TentativeParsingAction Inner(Self);
962 Self.ConsumeAndStoreUntil(EndKind, Toks,
true,
false);
973 std::copy(Toks.begin() + 1, Toks.end(), Buffer);
974 Buffer[Toks.size() - 1] = Self.Tok;
975 Self.PP.EnterTokenStream(Buffer, Toks.size(),
true,
true);
977 Self.Tok = Toks.front();
993 bool Parser::ConsumeAndStoreInitializer(
CachedTokens &Toks,
994 CachedInitKind CIK) {
1001 unsigned AngleCount = 0;
1002 unsigned KnownTemplateCount = 0;
1011 if (KnownTemplateCount)
1024 UnannotatedTentativeParsingAction PA(*
this,
1025 CIK == CIK_DefaultInitializer
1026 ? tok::semi : tok::r_paren);
1032 case CIK_DefaultInitializer:
1033 Result = TryParseInitDeclaratorList();
1040 case CIK_DefaultArgument:
1041 bool InvalidAsDeclaration =
false;
1042 Result = TryParseParameterDeclarationClause(
1043 &InvalidAsDeclaration,
true);
1061 PA.RevertAnnotations();
1065 ++KnownTemplateCount;
1069 case tok::annot_module_begin:
1070 case tok::annot_module_end:
1071 case tok::annot_module_include:
1084 if (!ConsumeAndStoreConditional(Toks))
1088 case tok::greatergreatergreater:
1091 if (AngleCount) --AngleCount;
1092 if (KnownTemplateCount) --KnownTemplateCount;
1094 case tok::greatergreater:
1097 if (AngleCount) --AngleCount;
1098 if (KnownTemplateCount) --KnownTemplateCount;
1101 if (AngleCount) --AngleCount;
1102 if (KnownTemplateCount) --KnownTemplateCount;
1105 case tok::kw_template:
1109 Toks.push_back(Tok);
1111 if (Tok.
is(tok::identifier)) {
1112 Toks.push_back(Tok);
1114 if (Tok.
is(tok::less)) {
1116 ++KnownTemplateCount;
1117 Toks.push_back(Tok);
1123 case tok::kw_operator:
1126 Toks.push_back(Tok);
1130 case tok::greatergreatergreater:
1131 case tok::greatergreater:
1134 Toks.push_back(Tok);
1144 Toks.push_back(Tok);
1146 ConsumeAndStoreUntil(tok::r_paren, Toks,
false);
1150 Toks.push_back(Tok);
1152 ConsumeAndStoreUntil(tok::r_square, Toks,
false);
1156 Toks.push_back(Tok);
1158 ConsumeAndStoreUntil(tok::r_brace, Toks,
false);
1168 if (CIK == CIK_DefaultArgument)
1170 if (ParenCount && !IsFirstToken)
1172 Toks.push_back(Tok);
1176 if (BracketCount && !IsFirstToken)
1178 Toks.push_back(Tok);
1182 if (BraceCount && !IsFirstToken)
1184 Toks.push_back(Tok);
1188 case tok::code_completion:
1189 Toks.push_back(Tok);
1190 ConsumeCodeCompletionToken();
1193 case tok::string_literal:
1194 case tok::wide_string_literal:
1195 case tok::utf8_string_literal:
1196 case tok::utf16_string_literal:
1197 case tok::utf32_string_literal:
1198 Toks.push_back(Tok);
1199 ConsumeStringToken();
1202 if (CIK == CIK_DefaultInitializer)
1207 Toks.push_back(Tok);
1211 IsFirstToken =
false;
void ActOnFinishDelayedMemberInitializers(Decl *Record)
This is a scope that corresponds to the parameters within a function prototype.
const LangOptions & getLangOpts() const
void ActOnStartDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
Defines the C++ template declaration subclasses.
bool hasErrorOccurred() const
FunctionDefinitionKind getFunctionDefinitionKind() const
This indicates that the scope corresponds to a function, which means that labels are set here...
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
void ActOnFinishDelayedCXXMethodDeclaration(Scope *S, Decl *Method)
const Expr * getInit() const
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
void ActOnDefaultCtorInitializers(Decl *CDtorDecl)
RAII object that enters a new expression evaluation context.
void ActOnStartDelayedMemberDeclarations(Scope *S, Decl *Record)
void setUninstantiatedDefaultArg(Expr *arg)
RAII object used to temporarily allow the C++ 'this' expression to be used, with the given qualifiers...
const ParsingDeclSpec & getDeclSpec() const
ParmVarDecl - Represents a parameter to a function.
void MarkAsLateParsedTemplate(FunctionDecl *FD, Decl *FnD, CachedTokens &Toks)
bool SkipUntil(tok::TokenKind T, SkipUntilFlags Flags=static_cast< SkipUntilFlags >(0))
SourceLocation getLocForEndOfToken(SourceLocation Loc, unsigned Offset=0)
Computes the source location just past the end of the token at this source location.
bool TryConsumeToken(tok::TokenKind Expected)
bool hasUninstantiatedDefaultArg() const
void setKind(tok::TokenKind K)
The current expression is potentially evaluated, but any declarations referenced inside that expressi...
SourceLocation getLocWithOffset(int Offset) const
Return a source location with the specified offset from this SourceLocation.
RAII class used to indicate that we are performing provisional semantic analysis to determine the val...
void ActOnFinishInlineMethodDef(CXXMethodDecl *D)
tok::TokenKind getKind() const
Decl * ActOnFinishFunctionBody(Decl *Decl, Stmt *Body)
void ProcessDeclAttributeList(Scope *S, Decl *D, const AttributeList *AL, bool IncludeCXX11Attributes=true)
Decl * ActOnStartOfFunctionDef(Scope *S, Declarator &D)
bool isFunctionDeclarator(unsigned &idx) const
const void * getEofData() const
A class for parsing a declarator.
UnannotatedTentativeParsingAction(Parser &Self, tok::TokenKind EndKind)
This file defines the classes used to store parsed information about declaration-specifiers and decla...
void setEofData(const void *D)
void ActOnFinishCXXInClassMemberInitializer(Decl *VarDecl, SourceLocation EqualLoc, Expr *Init)
This is invoked after parsing an in-class initializer for a non-static C++ class member, and after instantiating an in-class initializer in a class template. Such actions are deferred until the class is complete.
void ActOnDelayedCXXMethodParameter(Scope *S, Decl *Param)
void setLateTemplateParsed(bool ILT=true)
SourceLocation getLocation() const
Return a source location identifier for the specified offset in the current file. ...
bool isConstexprSpecified() const
bool isNot(tok::TokenKind K) const
void SetDeclDeleted(Decl *dcl, SourceLocation DelLoc)
DiagnosticsEngine & getDiagnostics() const
The result type of a method or function.
This is a scope that corresponds to the parameters within a function prototype for a function declara...
void ActOnStartCXXInClassMemberInitializer()
Enter a new C++ default initializer scope. After calling this, the caller must call ActOnFinishCXXInC...
FunctionDecl * getAsFunction() LLVM_READONLY
Returns the function itself, or the templated function if this is a function template.
Encodes a location in the source. The SourceManager can decode this to get at the full include stack...
void ActOnFinishDelayedMemberDeclarations(Scope *S, Decl *Record)
SourceLocation getEndLoc() const
bool isValid() const
Return true if this is a valid SourceLocation object.
Scope * getCurScope() const
void EnterTokenStream(const Token *Toks, unsigned NumToks, bool DisableMacroExpansion, bool OwnsTokens)
Add a "macro" context to the top of the include stack, which will cause the lexer to start returning ...
Represents a static or instance method of a struct/union/class.
void SetDeclDefaulted(Decl *dcl, SourceLocation DefaultLoc)
A tentative parsing action that can also revert token annotations.
bool isTemplateParamScope() const
void actOnDelayedExceptionSpecification(Decl *Method, ExceptionSpecificationType EST, SourceRange SpecificationRange, ArrayRef< ParsedType > DynamicExceptions, ArrayRef< SourceRange > DynamicExceptionRanges, Expr *NoexceptExpr)
Add an exception-specification to the given member function (or member function template). The exception-specification was parsed after the method itself was declared.
TokenKind
Provides a simple uniform namespace for tokens from all C languages.
Represents a C++11 virt-specifier-seq.
bool is(tok::TokenKind K) const
The scope of a struct/union/class definition.
bool hasUnparsedDefaultArg() const
bool isFriendSpecified() const
void ActOnParamDefaultArgument(Decl *param, SourceLocation EqualLoc, Expr *defarg)
This is a scope that corresponds to the template parameters of a C++ template. Template parameter sco...
bool isOneOf(tok::TokenKind K1, tok::TokenKind K2) const
DiagnosticBuilder Diag(SourceLocation Loc, unsigned DiagID)
NamedDecl * ActOnCXXMemberDeclarator(Scope *S, AccessSpecifier AS, Declarator &D, MultiTemplateParamsArg TemplateParameterLists, Expr *BitfieldWidth, const VirtSpecifiers &VS, InClassInitStyle InitStyle)
void CheckForFunctionRedefinition(FunctionDecl *FD, const FunctionDecl *EffectiveDefinition=nullptr)
ExprResult ParseAssignmentExpression(TypeCastState isTypeCast=NotTypeCast)
Parse an expr that doesn't include (top-level) commas.
ExceptionSpecificationType
The various types of exception specifications that exist in C++11.
This is a scope that can contain a declaration. Some scopes just contain loop constructs but don't co...
void ActOnParamDefaultArgumentError(Decl *param, SourceLocation EqualLoc)
SourceLocation ConsumeToken()
void ActOnPureSpecifier(Decl *D, SourceLocation PureSpecLoc)
ExprResult CorrectDelayedTyposInExpr(Expr *E, VarDecl *InitDecl=nullptr, llvm::function_ref< ExprResult(Expr *)> Filter=[](Expr *E) -> ExprResult{return E;})
Process any TypoExprs in the given Expr and its children, generating diagnostics as appropriate and r...
DeclContext * CurContext
CurContext - This is the current declaration context of parsing.
unsigned kind
All of the diagnostics that can be emitted by the frontend.
void setLocation(SourceLocation L)
A trivial tuple used to represent a source range.
Declaration of a template function.
bool IsInsideALocalClassWithinATemplateFunction()
void startToken()
Reset all flags to cleared.
Stop skipping at specified token, but don't skip the token itself.
NamedDecl * ActOnFriendFunctionDecl(Scope *S, Declarator &D, MultiTemplateParamsArg TemplateParams)
unsigned ActOnReenterTemplateScope(Scope *S, Decl *Template)