Skip to content

Commit 68ae1e4

Browse files
authored
[Clang][Sema][NFC] Remove unused Scope* parameter from Sema::GetTypeForDeclarator and Sema::ActOnTypeName (#78325)
Split from #78274
1 parent a3fc0f9 commit 68ae1e4

16 files changed

+43
-45
lines changed

clang/include/clang/Sema/Sema.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,7 +2153,7 @@ class Sema final {
21532153
SourceLocation Loc);
21542154
QualType BuildBitIntType(bool IsUnsigned, Expr *BitWidth, SourceLocation Loc);
21552155

2156-
TypeSourceInfo *GetTypeForDeclarator(Declarator &D, Scope *S);
2156+
TypeSourceInfo *GetTypeForDeclarator(Declarator &D);
21572157
TypeSourceInfo *GetTypeForDeclaratorCast(Declarator &D, QualType FromTy);
21582158

21592159
/// Package the given type and TSI into a ParsedType.
@@ -2194,7 +2194,7 @@ class Sema final {
21942194
SourceLocation TargetLoc, const FunctionProtoType *Source,
21952195
bool SkipSourceFirstParameter, SourceLocation SourceLoc);
21962196

2197-
TypeResult ActOnTypeName(Scope *S, Declarator &D);
2197+
TypeResult ActOnTypeName(Declarator &D);
21982198

21992199
/// The parser has parsed the context-sensitive type 'instancetype'
22002200
/// in an Objective-C message declaration. Return the appropriate type.

clang/lib/Parse/ParseDecl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ TypeResult Parser::ParseTypeName(SourceRange *Range, DeclaratorContext Context,
7979
if (DeclaratorInfo.isInvalidType())
8080
return true;
8181

82-
return Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
82+
return Actions.ActOnTypeName(DeclaratorInfo);
8383
}
8484

8585
/// Normalizes an attribute name by dropping prefixed and suffixed __.
@@ -5011,7 +5011,7 @@ void Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS,
50115011
DeclSpecContext::DSC_type_specifier);
50125012
Declarator DeclaratorInfo(DS, ParsedAttributesView::none(),
50135013
DeclaratorContext::TypeName);
5014-
BaseType = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
5014+
BaseType = Actions.ActOnTypeName(DeclaratorInfo);
50155015

50165016
BaseRange = SourceRange(ColonLoc, DeclaratorInfo.getSourceRange().getEnd());
50175017

clang/lib/Parse/ParseDeclCXX.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,7 +1290,7 @@ TypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc,
12901290

12911291
Declarator DeclaratorInfo(DS, ParsedAttributesView::none(),
12921292
DeclaratorContext::TypeName);
1293-
return Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
1293+
return Actions.ActOnTypeName(DeclaratorInfo);
12941294
}
12951295

12961296
// Check whether we have a template-id that names a type.
@@ -1385,7 +1385,7 @@ TypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc,
13851385

13861386
Declarator DeclaratorInfo(DS, ParsedAttributesView::none(),
13871387
DeclaratorContext::TypeName);
1388-
return Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
1388+
return Actions.ActOnTypeName(DeclaratorInfo);
13891389
}
13901390

13911391
void Parser::ParseMicrosoftInheritanceClassAttributes(ParsedAttributes &attrs) {

clang/lib/Parse/ParseExpr.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,8 +1243,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind,
12431243

12441244
Declarator DeclaratorInfo(DS, ParsedAttributesView::none(),
12451245
DeclaratorContext::TypeName);
1246-
TypeResult Ty = Actions.ActOnTypeName(getCurScope(),
1247-
DeclaratorInfo);
1246+
TypeResult Ty = Actions.ActOnTypeName(DeclaratorInfo);
12481247
if (Ty.isInvalid())
12491248
break;
12501249

@@ -1538,7 +1537,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind,
15381537

15391538
Declarator DeclaratorInfo(DS, ParsedAttributesView::none(),
15401539
DeclaratorContext::TypeName);
1541-
TypeResult Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
1540+
TypeResult Ty = Actions.ActOnTypeName(DeclaratorInfo);
15421541
if (Ty.isInvalid())
15431542
break;
15441543

@@ -3096,7 +3095,7 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
30963095
TypeResult Ty;
30973096
{
30983097
InMessageExpressionRAIIObject InMessage(*this, false);
3099-
Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
3098+
Ty = Actions.ActOnTypeName(DeclaratorInfo);
31003099
}
31013100
Result = ParseObjCMessageExpressionBody(SourceLocation(),
31023101
SourceLocation(),
@@ -3111,7 +3110,7 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
31113110
TypeResult Ty;
31123111
{
31133112
InMessageExpressionRAIIObject InMessage(*this, false);
3114-
Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
3113+
Ty = Actions.ActOnTypeName(DeclaratorInfo);
31153114
}
31163115
return ParseCompoundLiteralExpression(Ty.get(), OpenLoc, RParenLoc);
31173116
}
@@ -3123,7 +3122,7 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
31233122
TypeResult Ty;
31243123
{
31253124
InMessageExpressionRAIIObject InMessage(*this, false);
3126-
Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
3125+
Ty = Actions.ActOnTypeName(DeclaratorInfo);
31273126
}
31283127
if(Ty.isInvalid())
31293128
{
@@ -3170,7 +3169,7 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, bool stopIfCastExpr,
31703169
TypeResult Ty;
31713170
{
31723171
InMessageExpressionRAIIObject InMessage(*this, false);
3173-
Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
3172+
Ty = Actions.ActOnTypeName(DeclaratorInfo);
31743173
}
31753174
CastTy = Ty.get();
31763175
return ExprResult();

clang/lib/Parse/ParseExprCXX.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,7 @@ ExprResult
19161916
Parser::ParseCXXTypeConstructExpression(const DeclSpec &DS) {
19171917
Declarator DeclaratorInfo(DS, ParsedAttributesView::none(),
19181918
DeclaratorContext::FunctionalCast);
1919-
ParsedType TypeRep = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get();
1919+
ParsedType TypeRep = Actions.ActOnTypeName(DeclaratorInfo).get();
19201920

19211921
assert((Tok.is(tok::l_paren) ||
19221922
(getLangOpts().CPlusPlus11 && Tok.is(tok::l_brace)))
@@ -2815,7 +2815,7 @@ bool Parser::ParseUnqualifiedIdOperator(CXXScopeSpec &SS, bool EnteringContext,
28152815
ParseDeclaratorInternal(D, /*DirectDeclParser=*/nullptr);
28162816

28172817
// Finish up the type.
2818-
TypeResult Ty = Actions.ActOnTypeName(getCurScope(), D);
2818+
TypeResult Ty = Actions.ActOnTypeName(D);
28192819
if (Ty.isInvalid())
28202820
return true;
28212821

@@ -3252,8 +3252,7 @@ Parser::ParseCXXNewExpression(bool UseGlobal, SourceLocation Start) {
32523252
ConstructorLParen = T.getOpenLocation();
32533253
if (Tok.isNot(tok::r_paren)) {
32543254
auto RunSignatureHelp = [&]() {
3255-
ParsedType TypeRep =
3256-
Actions.ActOnTypeName(getCurScope(), DeclaratorInfo).get();
3255+
ParsedType TypeRep = Actions.ActOnTypeName(DeclaratorInfo).get();
32573256
QualType PreferredType;
32583257
// ActOnTypeName might adjust DeclaratorInfo and return a null type even
32593258
// the passing DeclaratorInfo is valid, e.g. running SignatureHelp on
@@ -4037,7 +4036,7 @@ Parser::ParseCXXAmbiguousParenExpression(ParenParseOption &ExprType,
40374036
if (DeclaratorInfo.isInvalidType())
40384037
return ExprError();
40394038

4040-
TypeResult Ty = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
4039+
TypeResult Ty = Actions.ActOnTypeName(DeclaratorInfo);
40414040
return ParseCompoundLiteralExpression(Ty.get(),
40424041
Tracker.getOpenLocation(),
40434042
Tracker.getCloseLocation());

clang/lib/Parse/ParseObjc.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,7 +1332,7 @@ ParsedType Parser::ParseObjCTypeName(ObjCDeclSpec &DS,
13321332
DS.getNullabilityLoc(),
13331333
addedToDeclSpec);
13341334

1335-
TypeResult type = Actions.ActOnTypeName(getCurScope(), declarator);
1335+
TypeResult type = Actions.ActOnTypeName(declarator);
13361336
if (!type.isInvalid())
13371337
Ty = type.get();
13381338

@@ -1747,7 +1747,7 @@ void Parser::parseObjCTypeArgsOrProtocolQualifiers(
17471747
// Form a declarator to turn this into a type.
17481748
Declarator D(DS, ParsedAttributesView::none(),
17491749
DeclaratorContext::TypeName);
1750-
TypeResult fullTypeArg = Actions.ActOnTypeName(getCurScope(), D);
1750+
TypeResult fullTypeArg = Actions.ActOnTypeName(D);
17511751
if (fullTypeArg.isUsable()) {
17521752
typeArgs.push_back(fullTypeArg.get());
17531753
if (!foundValidTypeId) {
@@ -3024,7 +3024,7 @@ bool Parser::ParseObjCXXMessageReceiver(bool &IsExpr, void *&TypeOrExpr) {
30243024
// remainder of the class message.
30253025
Declarator DeclaratorInfo(DS, ParsedAttributesView::none(),
30263026
DeclaratorContext::TypeName);
3027-
TypeResult Type = Actions.ActOnTypeName(getCurScope(), DeclaratorInfo);
3027+
TypeResult Type = Actions.ActOnTypeName(DeclaratorInfo);
30283028
if (Type.isInvalid())
30293029
return true;
30303030

clang/lib/Sema/SemaDecl.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5803,7 +5803,7 @@ Decl *Sema::BuildAnonymousStructOrUnion(Scope *S, DeclSpec &DS,
58035803
// Mock up a declarator.
58045804
Declarator Dc(DS, ParsedAttributesView::none(), DeclaratorContext::Member);
58055805
StorageClass SC = StorageClassSpecToVarDeclStorageClass(DS);
5806-
TypeSourceInfo *TInfo = GetTypeForDeclarator(Dc, S);
5806+
TypeSourceInfo *TInfo = GetTypeForDeclarator(Dc);
58075807
assert(TInfo && "couldn't build declarator info for anonymous struct/union");
58085808

58095809
// Create a declaration for this anonymous struct/union.
@@ -5900,7 +5900,7 @@ Decl *Sema::BuildMicrosoftCAnonymousStruct(Scope *S, DeclSpec &DS,
59005900

59015901
// Mock up a declarator.
59025902
Declarator Dc(DS, ParsedAttributesView::none(), DeclaratorContext::TypeName);
5903-
TypeSourceInfo *TInfo = GetTypeForDeclarator(Dc, S);
5903+
TypeSourceInfo *TInfo = GetTypeForDeclarator(Dc);
59045904
assert(TInfo && "couldn't build declarator info for anonymous struct");
59055905

59065906
auto *ParentDecl = cast<RecordDecl>(CurContext);
@@ -6438,7 +6438,7 @@ NamedDecl *Sema::HandleDeclarator(Scope *S, Declarator &D,
64386438
}
64396439
}
64406440

6441-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
6441+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
64426442
QualType R = TInfo->getType();
64436443

64446444
if (DiagnoseUnexpandedParameterPack(D.getIdentifierLoc(), TInfo,
@@ -15072,7 +15072,7 @@ Decl *Sema::ActOnParamDeclarator(Scope *S, Declarator &D,
1507215072

1507315073
CheckFunctionOrTemplateParamDeclarator(S, D);
1507415074

15075-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
15075+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
1507615076
QualType parmDeclType = TInfo->getType();
1507715077

1507815078
// Check for redeclaration of parameters, e.g. int foo(int x, int x);
@@ -18336,7 +18336,7 @@ FieldDecl *Sema::HandleField(Scope *S, RecordDecl *Record,
1833618336
SourceLocation Loc = DeclStart;
1833718337
if (II) Loc = D.getIdentifierLoc();
1833818338

18339-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
18339+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
1834018340
QualType T = TInfo->getType();
1834118341
if (getLangOpts().CPlusPlus) {
1834218342
CheckExtraCXXDefaultArguments(D);
@@ -18700,7 +18700,7 @@ Decl *Sema::ActOnIvar(Scope *S, SourceLocation DeclStart, Declarator &D,
1870018700
// FIXME: Unnamed fields can be handled in various different ways, for
1870118701
// example, unnamed unions inject all members into the struct namespace!
1870218702

18703-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
18703+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
1870418704
QualType T = TInfo->getType();
1870518705

1870618706
if (BitWidth) {

clang/lib/Sema/SemaDeclCXX.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ Sema::ActOnDecompositionDeclarator(Scope *S, Declarator &D,
839839
Diag(DS.getVolatileSpecLoc(),
840840
diag::warn_deprecated_volatile_structured_binding);
841841

842-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
842+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
843843
QualType R = TInfo->getType();
844844

845845
if (DiagnoseUnexpandedParameterPack(D.getIdentifierLoc(), TInfo,
@@ -17011,7 +17011,7 @@ VarDecl *Sema::BuildExceptionDeclaration(Scope *S,
1701117011
/// ActOnExceptionDeclarator - Parsed the exception-declarator in a C++ catch
1701217012
/// handler.
1701317013
Decl *Sema::ActOnExceptionDeclarator(Scope *S, Declarator &D) {
17014-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
17014+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
1701517015
bool Invalid = D.isInvalidType();
1701617016

1701717017
// Check for unexpanded parameter packs.
@@ -17762,7 +17762,7 @@ Decl *Sema::ActOnFriendTypeDecl(Scope *S, const DeclSpec &DS,
1776217762
// for a TUK_Friend.
1776317763
Declarator TheDeclarator(DS, ParsedAttributesView::none(),
1776417764
DeclaratorContext::Member);
17765-
TypeSourceInfo *TSI = GetTypeForDeclarator(TheDeclarator, S);
17765+
TypeSourceInfo *TSI = GetTypeForDeclarator(TheDeclarator);
1776617766
QualType T = TSI->getType();
1776717767
if (TheDeclarator.isInvalidType())
1776817768
return nullptr;
@@ -17827,7 +17827,7 @@ NamedDecl *Sema::ActOnFriendFunctionDecl(Scope *S, Declarator &D,
1782717827
assert(DS.getStorageClassSpec() == DeclSpec::SCS_unspecified);
1782817828

1782917829
SourceLocation Loc = D.getIdentifierLoc();
17830-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
17830+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
1783117831

1783217832
// C++ [class.friend]p1
1783317833
// A friend of a class is a function or class....
@@ -19182,7 +19182,7 @@ MSPropertyDecl *Sema::HandleMSProperty(Scope *S, RecordDecl *Record,
1918219182
}
1918319183
SourceLocation Loc = D.getIdentifierLoc();
1918419184

19185-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
19185+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
1918619186
QualType T = TInfo->getType();
1918719187
if (getLangOpts().CPlusPlus) {
1918819188
CheckExtraCXXDefaultArguments(D);

clang/lib/Sema/SemaDeclObjC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1623,7 +1623,7 @@ void Sema::actOnObjCTypeArgsOrProtocolQualifiers(
16231623
}
16241624

16251625
// Convert this to a type.
1626-
return ActOnTypeName(S, D);
1626+
return ActOnTypeName(D);
16271627
};
16281628

16291629
// Local function that updates the declaration specifiers with
@@ -5211,7 +5211,7 @@ Decl *Sema::ActOnObjCExceptionDecl(Scope *S, Declarator &D) {
52115211
if (getLangOpts().CPlusPlus)
52125212
CheckExtraCXXDefaultArguments(D);
52135213

5214-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
5214+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
52155215
QualType ExceptionType = TInfo->getType();
52165216

52175217
VarDecl *New = BuildObjCExceptionDecl(TInfo, ExceptionType,

clang/lib/Sema/SemaExpr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16974,7 +16974,7 @@ void Sema::ActOnBlockArguments(SourceLocation CaretLoc, Declarator &ParamInfo,
1697416974
assert(ParamInfo.getContext() == DeclaratorContext::BlockLiteral);
1697516975
BlockScopeInfo *CurBlock = getCurBlock();
1697616976

16977-
TypeSourceInfo *Sig = GetTypeForDeclarator(ParamInfo, CurScope);
16977+
TypeSourceInfo *Sig = GetTypeForDeclarator(ParamInfo);
1697816978
QualType T = Sig->getType();
1697916979

1698016980
// FIXME: We should allow unexpanded parameter packs here, but that would,

clang/lib/Sema/SemaExprCXX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1931,7 +1931,7 @@ Sema::ActOnCXXNew(SourceLocation StartLoc, bool UseGlobal,
19311931
}
19321932
}
19331933

1934-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, /*Scope=*/nullptr);
1934+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
19351935
QualType AllocType = TInfo->getType();
19361936
if (D.isInvalidType())
19371937
return ExprError();

clang/lib/Sema/SemaLambda.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ static TypeSourceInfo *getLambdaType(Sema &S, LambdaIntroducer &Intro,
916916
}
917917
}
918918

919-
MethodTyInfo = S.GetTypeForDeclarator(ParamInfo, CurScope);
919+
MethodTyInfo = S.GetTypeForDeclarator(ParamInfo);
920920
assert(MethodTyInfo && "no type from lambda-declarator");
921921

922922
// Check for unexpanded parameter packs in the method type.

clang/lib/Sema/SemaObjCProperty.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Decl *Sema::ActOnProperty(Scope *S, SourceLocation AtLoc,
180180
unsigned Attributes = ODS.getPropertyAttributes();
181181
FD.D.setObjCWeakProperty((Attributes & ObjCPropertyAttribute::kind_weak) !=
182182
0);
183-
TypeSourceInfo *TSI = GetTypeForDeclarator(FD.D, S);
183+
TypeSourceInfo *TSI = GetTypeForDeclarator(FD.D);
184184
QualType T = TSI->getType();
185185
if (!getOwnershipRule(Attributes)) {
186186
Attributes |= deducePropertyOwnershipFromType(*this, T);

clang/lib/Sema/SemaOpenMP.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7304,7 +7304,7 @@ void Sema::ActOnStartOfFunctionDefinitionInOpenMPDeclareVariantScope(
73047304
LookupOrdinaryName);
73057305
LookupParsedName(Lookup, S, &D.getCXXScopeSpec());
73067306

7307-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
7307+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
73087308
QualType FType = TInfo->getType();
73097309

73107310
bool IsConstexpr =
@@ -22719,7 +22719,7 @@ Sema::DeclGroupPtrTy Sema::ActOnOpenMPDeclareReductionDirectiveEnd(
2271922719
}
2272022720

2272122721
TypeResult Sema::ActOnOpenMPDeclareMapperVarDecl(Scope *S, Declarator &D) {
22722-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
22722+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
2272322723
QualType T = TInfo->getType();
2272422724
if (D.isInvalidType())
2272522725
return true;

clang/lib/Sema/SemaTemplate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ NamedDecl *Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
14981498
unsigned Position,
14991499
SourceLocation EqualLoc,
15001500
Expr *Default) {
1501-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
1501+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
15021502

15031503
// Check that we have valid decl-specifiers specified.
15041504
auto CheckValidDeclSpecifiers = [this, &D] {
@@ -10521,7 +10521,7 @@ DeclResult Sema::ActOnExplicitInstantiation(Scope *S,
1052110521
S = S->getParent();
1052210522

1052310523
// Determine the type of the declaration.
10524-
TypeSourceInfo *T = GetTypeForDeclarator(D, S);
10524+
TypeSourceInfo *T = GetTypeForDeclarator(D);
1052510525
QualType R = T->getType();
1052610526
if (R.isNull())
1052710527
return true;

clang/lib/Sema/SemaType.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6070,7 +6070,7 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
60706070
///
60716071
/// The result of this call will never be null, but the associated
60726072
/// type may be a null type if there's an unrecoverable error.
6073-
TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S) {
6073+
TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D) {
60746074
// Determine the type of the declarator. Not all forms of declarator
60756075
// have a type.
60766076

@@ -6748,13 +6748,13 @@ void LocInfoType::getAsStringInternal(std::string &Str,
67486748
" GetTypeFromParser");
67496749
}
67506750

6751-
TypeResult Sema::ActOnTypeName(Scope *S, Declarator &D) {
6751+
TypeResult Sema::ActOnTypeName(Declarator &D) {
67526752
// C99 6.7.6: Type names have no identifier. This is already validated by
67536753
// the parser.
67546754
assert(D.getIdentifier() == nullptr &&
67556755
"Type name should have no identifier!");
67566756

6757-
TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
6757+
TypeSourceInfo *TInfo = GetTypeForDeclarator(D);
67586758
QualType T = TInfo->getType();
67596759
if (D.isInvalidType())
67606760
return true;

0 commit comments

Comments
 (0)