Skip to content

Commit 2b2731b

Browse files
SC llvm teamSC llvm team
authored andcommitted
Merged main:30d0850e0f780b17a37522e6503c98ebe197c5fa into amd-gfx:c4099e191a09
Local branch amd-gfx c4099e1 Merged main:371eccd5dfed88c8e76449233d8388c12be3464b into amd-gfx:d4000e397a2b Remote branch main 30d0850 [clang][NFC] Improve const-correctness in `ParseLexedMethodDeclaration`
2 parents c4099e1 + 30d0850 commit 2b2731b

File tree

85 files changed

+1619
-426
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1619
-426
lines changed

.github/workflows/issue-release-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353

5454
- name: Setup Environment
5555
run: |
56-
pip install -r ./llvm/utils/git/requirements.txt
56+
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
5757
./llvm/utils/git/github-automation.py --token ${{ github.token }} setup-llvmbot-git
5858
5959
- name: Backport Commits

.github/workflows/issue-subscriber.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Automation Script
2323
working-directory: ./llvm/utils/git/
2424
run: |
25-
pip install -r requirements.txt
25+
pip install --require-hashes -r requirements.txt
2626
2727
- name: Update watchers
2828
working-directory: ./llvm/utils/git/

.github/workflows/merged-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Setup Automation Script
3030
working-directory: ./llvm/utils/git/
3131
run: |
32-
pip install -r requirements.txt
32+
pip install --require-hashes -r requirements.txt
3333
3434
- name: Add Buildbot information comment
3535
working-directory: ./llvm/utils/git/

.github/workflows/new-prs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Setup Automation Script
4444
working-directory: ./llvm/utils/git/
4545
run: |
46-
pip install -r requirements.txt
46+
pip install --require-hashes -r requirements.txt
4747
4848
- name: Greet Author
4949
working-directory: ./llvm/utils/git/

.github/workflows/pr-request-release-note.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929

3030
- name: Install Dependencies
3131
run: |
32-
pip install -r llvm/utils/git/requirements.txt
32+
pip install --require-hashes -r llvm/utils/git/requirements.txt
3333
3434
- name: Request Release Note
3535
env:

.github/workflows/pr-subscriber.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup Automation Script
2323
working-directory: ./llvm/utils/git/
2424
run: |
25-
pip install -r requirements.txt
25+
pip install --require-hashes -r requirements.txt
2626
2727
- name: Update watchers
2828
working-directory: ./llvm/utils/git/

.github/workflows/release-binaries.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Install Dependencies
4949
run: |
50-
pip install -r ./llvm/utils/git/requirements.txt
50+
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
5151
5252
- name: Check Permissions
5353
env:

.github/workflows/version-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Install dependencies
2525
run: |
26-
pip install -r ./llvm/utils/git/requirements.txt
26+
pip install --require-hashes -r ./llvm/utils/git/requirements.txt
2727
2828
- name: Version Check
2929
run: |

clang/cmake/caches/HLSL.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD "DirectX;SPIRV" CACHE STRING "")
88

99
# HLSL support is currently limted to clang, eventually it will expand to
1010
# clang-tools-extra too.
11-
set(LLVM_ENABLE_PROJECTS "clang" CACHE STRING "")
11+
set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra" CACHE STRING "")
1212

1313
set(CLANG_ENABLE_HLSL On CACHE BOOL "")
14+
15+
if (NOT CMAKE_CONFIGURATION_TYPES)
16+
set(LLVM_DISTRIBUTION_COMPONENTS
17+
"clang;hlsl-resource-headers;clangd"
18+
CACHE STRING "")
19+
endif()

clang/docs/ReleaseNotes.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ Attribute Changes in Clang
403403
- Clang now warns that the ``exclude_from_explicit_instantiation`` attribute
404404
is ignored when applied to a local class or a member thereof.
405405

406+
- The ``clspv_libclc_builtin`` attribute has been added to allow clspv
407+
(`OpenCL-C to Vulkan SPIR-V compiler <https://github.com/google/clspv>`_) to identify functions coming from libclc
408+
(`OpenCL-C builtin library <https://libclc.llvm.org>`_).
409+
406410
Improvements to Clang's diagnostics
407411
-----------------------------------
408412
- Clang now applies syntax highlighting to the code snippets it
@@ -494,6 +498,9 @@ Improvements to Clang's diagnostics
494498
}
495499
};
496500

501+
- Clang emits a ``-Wparentheses`` warning for expressions with consecutive comparisons like ``x < y < z``.
502+
Fixes #GH20456.
503+
497504
Improvements to Clang's time-trace
498505
----------------------------------
499506

clang/include/clang/AST/Decl.h

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,13 +2096,12 @@ class FunctionDecl : public DeclaratorDecl,
20962096
///
20972097
/// \param PointOfInstantiation point at which the function template
20982098
/// specialization was first instantiated.
2099-
void setFunctionTemplateSpecialization(ASTContext &C,
2100-
FunctionTemplateDecl *Template,
2101-
const TemplateArgumentList *TemplateArgs,
2102-
void *InsertPos,
2103-
TemplateSpecializationKind TSK,
2104-
const TemplateArgumentListInfo *TemplateArgsAsWritten,
2105-
SourceLocation PointOfInstantiation);
2099+
void setFunctionTemplateSpecialization(
2100+
ASTContext &C, FunctionTemplateDecl *Template,
2101+
TemplateArgumentList *TemplateArgs, void *InsertPos,
2102+
TemplateSpecializationKind TSK,
2103+
const TemplateArgumentListInfo *TemplateArgsAsWritten,
2104+
SourceLocation PointOfInstantiation);
21062105

21072106
/// Specify that this record is an instantiation of the
21082107
/// member function FD.
@@ -2981,12 +2980,12 @@ class FunctionDecl : public DeclaratorDecl,
29812980
///
29822981
/// \param PointOfInstantiation point at which the function template
29832982
/// specialization was first instantiated.
2984-
void setFunctionTemplateSpecialization(FunctionTemplateDecl *Template,
2985-
const TemplateArgumentList *TemplateArgs,
2986-
void *InsertPos,
2987-
TemplateSpecializationKind TSK = TSK_ImplicitInstantiation,
2988-
const TemplateArgumentListInfo *TemplateArgsAsWritten = nullptr,
2989-
SourceLocation PointOfInstantiation = SourceLocation()) {
2983+
void setFunctionTemplateSpecialization(
2984+
FunctionTemplateDecl *Template, TemplateArgumentList *TemplateArgs,
2985+
void *InsertPos,
2986+
TemplateSpecializationKind TSK = TSK_ImplicitInstantiation,
2987+
TemplateArgumentListInfo *TemplateArgsAsWritten = nullptr,
2988+
SourceLocation PointOfInstantiation = SourceLocation()) {
29902989
setFunctionTemplateSpecialization(getASTContext(), Template, TemplateArgs,
29912990
InsertPos, TSK, TemplateArgsAsWritten,
29922991
PointOfInstantiation);

clang/include/clang/AST/DeclTemplate.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class FunctionTemplateSpecializationInfo final
478478
public:
479479
/// The template arguments used to produce the function template
480480
/// specialization from the function template.
481-
const TemplateArgumentList *TemplateArguments;
481+
TemplateArgumentList *TemplateArguments;
482482

483483
/// The template arguments as written in the sources, if provided.
484484
/// FIXME: Normally null; tail-allocate this.
@@ -491,7 +491,7 @@ class FunctionTemplateSpecializationInfo final
491491
private:
492492
FunctionTemplateSpecializationInfo(
493493
FunctionDecl *FD, FunctionTemplateDecl *Template,
494-
TemplateSpecializationKind TSK, const TemplateArgumentList *TemplateArgs,
494+
TemplateSpecializationKind TSK, TemplateArgumentList *TemplateArgs,
495495
const ASTTemplateArgumentListInfo *TemplateArgsAsWritten,
496496
SourceLocation POI, MemberSpecializationInfo *MSInfo)
497497
: Function(FD, MSInfo ? true : false), Template(Template, TSK - 1),
@@ -511,8 +511,7 @@ class FunctionTemplateSpecializationInfo final
511511

512512
static FunctionTemplateSpecializationInfo *
513513
Create(ASTContext &C, FunctionDecl *FD, FunctionTemplateDecl *Template,
514-
TemplateSpecializationKind TSK,
515-
const TemplateArgumentList *TemplateArgs,
514+
TemplateSpecializationKind TSK, TemplateArgumentList *TemplateArgs,
516515
const TemplateArgumentListInfo *TemplateArgsAsWritten,
517516
SourceLocation POI, MemberSpecializationInfo *MSInfo);
518517

clang/include/clang/Basic/Attr.td

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4561,3 +4561,10 @@ def CodeAlign: StmtAttr {
45614561
static constexpr int MaximumAlignment = 4096;
45624562
}];
45634563
}
4564+
4565+
def ClspvLibclcBuiltin: InheritableAttr {
4566+
let Spellings = [Clang<"clspv_libclc_builtin">];
4567+
let Subjects = SubjectList<[Function]>;
4568+
let Documentation = [ClspvLibclcBuiltinDoc];
4569+
let SimpleHandler = 1;
4570+
}

clang/include/clang/Basic/AttrDocs.td

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8087,3 +8087,17 @@ requirement:
80878087
}
80888088
}];
80898089
}
8090+
8091+
def ClspvLibclcBuiltinDoc : Documentation {
8092+
let Category = DocCatFunction;
8093+
let Content = [{
8094+
Attribute used by `clspv`_ (OpenCL-C to Vulkan SPIR-V compiler) to identify functions coming from `libclc`_ (OpenCL-C builtin library).
8095+
8096+
.. code-block:: c
8097+
8098+
void __attribute__((clspv_libclc_builtin)) libclc_builtin() {}
8099+
8100+
.. _`clspv`: https://github.com/google/clspv
8101+
.. _`libclc`: https://libclc.llvm.org
8102+
}];
8103+
}

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,6 +3209,8 @@ def warn_attribute_arm_zt0_builtin_no_zt0_state : Warning<
32093209
InGroup<DiagGroup<"undefined-arm-zt0">>;
32103210
def err_sve_vector_in_non_sve_target : Error<
32113211
"SVE vector type %0 cannot be used in a target without sve">;
3212+
def err_sve_vector_in_non_streaming_function : Error<
3213+
"SVE vector type %0 cannot be used in a non-streaming function">;
32123214
def err_attribute_riscv_rvv_bits_unsupported : Error<
32133215
"%0 is only supported when '-mrvv-vector-bits=<bits>' is specified with a "
32143216
"value of \"zvl\" or a power 2 in the range [64,65536]">;
@@ -6917,6 +6919,10 @@ def warn_precedence_bitwise_conditional : Warning<
69176919
def note_precedence_conditional_first : Note<
69186920
"place parentheses around the '?:' expression to evaluate it first">;
69196921

6922+
def warn_consecutive_comparison : Warning<
6923+
"comparisons like 'X<=Y<=Z' don't have their mathematical meaning">,
6924+
InGroup<Parentheses>;
6925+
69206926
def warn_enum_constant_in_bool_context : Warning<
69216927
"converting the enum constant to a boolean">,
69226928
InGroup<IntInBoolContext>, DefaultIgnore;

clang/include/clang/Basic/arm_sme.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,16 @@ multiclass ZAAddSub<string n_suffix> {
298298
def NAME # _ZA64_VG1X2_F64 : Inst<"sv" # n_suffix # "_za64[_{d}]_vg1x2", "vm2", "d", MergeNone, "aarch64_sme_" # n_suffix # "_za64_vg1x2", [IsStreaming, IsInOutZA], []>;
299299
def NAME # _ZA64_VG1X4_F64 : Inst<"sv" # n_suffix # "_za64[_{d}]_vg1x4", "vm4", "d", MergeNone, "aarch64_sme_" # n_suffix # "_za64_vg1x4", [IsStreaming, IsInOutZA], []>;
300300
}
301+
302+
let TargetGuard = "sme-f16f16|sme-f8f16" in {
303+
def NAME # _ZA16_VG1X2_F16 : Inst<"sv" # n_suffix # "_za16[_{d}]_vg1x2", "vm2", "h", MergeNone, "aarch64_sme_" # n_suffix # "_za16_vg1x2", [IsStreaming, IsInOutZA], []>;
304+
def NAME # _ZA16_VG1X4_F16 : Inst<"sv" # n_suffix # "_za16[_{d}]_vg1x4", "vm4", "h", MergeNone, "aarch64_sme_" # n_suffix # "_za16_vg1x4", [IsStreaming, IsInOutZA], []>;
305+
}
306+
307+
let TargetGuard = "sme2,b16b16" in {
308+
def NAME # _ZA16_VG1X2_BF16 : Inst<"sv" # n_suffix # "_za16[_{d}]_vg1x2", "vm2", "b", MergeNone, "aarch64_sme_" # n_suffix # "_za16_vg1x2", [IsStreaming, IsInOutZA], []>;
309+
def NAME # _ZA16_VG1X4_BF16 : Inst<"sv" # n_suffix # "_za16[_{d}]_vg1x4", "vm4", "b", MergeNone, "aarch64_sme_" # n_suffix # "_za16_vg1x4", [IsStreaming, IsInOutZA], []>;
310+
}
301311
}
302312

303313
defm SVADD : ZAAddSub<"add">;

clang/include/clang/Parse/Parser.h

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2480,24 +2480,23 @@ class Parser : public CodeCompletionHandler {
24802480
bool trySkippingFunctionBody();
24812481

24822482
bool ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS,
2483-
const ParsedTemplateInfo &TemplateInfo,
2484-
AccessSpecifier AS, DeclSpecContext DSC,
2485-
ParsedAttributes &Attrs);
2483+
ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS,
2484+
DeclSpecContext DSC, ParsedAttributes &Attrs);
24862485
DeclSpecContext
24872486
getDeclSpecContextFromDeclaratorContext(DeclaratorContext Context);
2488-
void ParseDeclarationSpecifiers(
2489-
DeclSpec &DS,
2490-
const ParsedTemplateInfo &TemplateInfo = ParsedTemplateInfo(),
2491-
AccessSpecifier AS = AS_none,
2492-
DeclSpecContext DSC = DeclSpecContext::DSC_normal,
2493-
LateParsedAttrList *LateAttrs = nullptr) {
2487+
void
2488+
ParseDeclarationSpecifiers(DeclSpec &DS, ParsedTemplateInfo &TemplateInfo,
2489+
AccessSpecifier AS = AS_none,
2490+
DeclSpecContext DSC = DeclSpecContext::DSC_normal,
2491+
LateParsedAttrList *LateAttrs = nullptr) {
24942492
return ParseDeclarationSpecifiers(DS, TemplateInfo, AS, DSC, LateAttrs,
24952493
getImplicitTypenameContext(DSC));
24962494
}
2497-
void ParseDeclarationSpecifiers(
2498-
DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS,
2499-
DeclSpecContext DSC, LateParsedAttrList *LateAttrs,
2500-
ImplicitTypenameContext AllowImplicitTypename);
2495+
void
2496+
ParseDeclarationSpecifiers(DeclSpec &DS, ParsedTemplateInfo &TemplateInfo,
2497+
AccessSpecifier AS, DeclSpecContext DSC,
2498+
LateParsedAttrList *LateAttrs,
2499+
ImplicitTypenameContext AllowImplicitTypename);
25012500

25022501
SourceLocation ParsePackIndexingType(DeclSpec &DS);
25032502
void AnnotateExistingIndexedTypeNamePack(ParsedType T,
@@ -3308,7 +3307,7 @@ class Parser : public CodeCompletionHandler {
33083307
// C++ 9: classes [class] and C structs/unions.
33093308
bool isValidAfterTypeSpecifier(bool CouldBeBitfield);
33103309
void ParseClassSpecifier(tok::TokenKind TagTokKind, SourceLocation TagLoc,
3311-
DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo,
3310+
DeclSpec &DS, ParsedTemplateInfo &TemplateInfo,
33123311
AccessSpecifier AS, bool EnteringContext,
33133312
DeclSpecContext DSC, ParsedAttributes &Attributes);
33143313
void SkipCXXMemberSpecification(SourceLocation StartLoc,
@@ -3330,7 +3329,7 @@ class Parser : public CodeCompletionHandler {
33303329
VirtSpecifiers &VS);
33313330
DeclGroupPtrTy ParseCXXClassMemberDeclaration(
33323331
AccessSpecifier AS, ParsedAttributes &Attr,
3333-
const ParsedTemplateInfo &TemplateInfo = ParsedTemplateInfo(),
3332+
ParsedTemplateInfo &TemplateInfo,
33343333
ParsingDeclRAIIObject *DiagsFromTParams = nullptr);
33353334
DeclGroupPtrTy
33363335
ParseCXXClassMemberDeclarationWithPragmas(AccessSpecifier &AS,

clang/lib/AST/Decl.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4199,14 +4199,12 @@ FunctionDecl::getTemplateSpecializationArgsAsWritten() const {
41994199
return nullptr;
42004200
}
42014201

4202-
void
4203-
FunctionDecl::setFunctionTemplateSpecialization(ASTContext &C,
4204-
FunctionTemplateDecl *Template,
4205-
const TemplateArgumentList *TemplateArgs,
4206-
void *InsertPos,
4207-
TemplateSpecializationKind TSK,
4208-
const TemplateArgumentListInfo *TemplateArgsAsWritten,
4209-
SourceLocation PointOfInstantiation) {
4202+
void FunctionDecl::setFunctionTemplateSpecialization(
4203+
ASTContext &C, FunctionTemplateDecl *Template,
4204+
TemplateArgumentList *TemplateArgs, void *InsertPos,
4205+
TemplateSpecializationKind TSK,
4206+
const TemplateArgumentListInfo *TemplateArgsAsWritten,
4207+
SourceLocation PointOfInstantiation) {
42104208
assert((TemplateOrSpecialization.isNull() ||
42114209
TemplateOrSpecialization.is<MemberSpecializationInfo *>()) &&
42124210
"Member function is already a specialization");

clang/lib/AST/DeclTemplate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ TemplateArgumentList::CreateCopy(ASTContext &Context,
884884

885885
FunctionTemplateSpecializationInfo *FunctionTemplateSpecializationInfo::Create(
886886
ASTContext &C, FunctionDecl *FD, FunctionTemplateDecl *Template,
887-
TemplateSpecializationKind TSK, const TemplateArgumentList *TemplateArgs,
887+
TemplateSpecializationKind TSK, TemplateArgumentList *TemplateArgs,
888888
const TemplateArgumentListInfo *TemplateArgsAsWritten, SourceLocation POI,
889889
MemberSpecializationInfo *MSInfo) {
890890
const ASTTemplateArgumentListInfo *ArgsAsWritten = nullptr;

clang/lib/CodeGen/CodeGenFunction.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,11 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy,
985985
EmitKernelMetadata(FD, Fn);
986986
}
987987

988+
if (FD && FD->hasAttr<ClspvLibclcBuiltinAttr>()) {
989+
Fn->setMetadata("clspv_libclc_builtin",
990+
llvm::MDNode::get(getLLVMContext(), {}));
991+
}
992+
988993
// If we are checking function types, emit a function type signature as
989994
// prologue data.
990995
if (FD && SanOpts.has(SanitizerKind::Function)) {

clang/lib/Parse/ParseCXXInlineMethods.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,14 +466,14 @@ void Parser::ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM) {
466466
ConsumeAnyToken();
467467
} else if (HasUnparsed) {
468468
assert(Param->hasInheritedDefaultArg());
469-
const FunctionDecl *Old;
469+
FunctionDecl *Old;
470470
if (const auto *FunTmpl = dyn_cast<FunctionTemplateDecl>(LM.Method))
471471
Old =
472472
cast<FunctionDecl>(FunTmpl->getTemplatedDecl())->getPreviousDecl();
473473
else
474474
Old = cast<FunctionDecl>(LM.Method)->getPreviousDecl();
475475
if (Old) {
476-
ParmVarDecl *OldParam = const_cast<ParmVarDecl*>(Old->getParamDecl(I));
476+
ParmVarDecl *OldParam = Old->getParamDecl(I);
477477
assert(!OldParam->hasUnparsedDefaultArg());
478478
if (OldParam->hasUninstantiatedDefaultArg())
479479
Param->setUninstantiatedDefaultArg(

clang/lib/Parse/ParseDecl.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2845,10 +2845,11 @@ Decl *Parser::ParseDeclarationAfterDeclaratorAndAttributes(
28452845
void Parser::ParseSpecifierQualifierList(
28462846
DeclSpec &DS, ImplicitTypenameContext AllowImplicitTypename,
28472847
AccessSpecifier AS, DeclSpecContext DSC) {
2848+
ParsedTemplateInfo TemplateInfo;
28482849
/// specifier-qualifier-list is a subset of declaration-specifiers. Just
28492850
/// parse declaration-specifiers and complain about extra stuff.
28502851
/// TODO: diagnose attribute-specifiers and alignment-specifiers.
2851-
ParseDeclarationSpecifiers(DS, ParsedTemplateInfo(), AS, DSC, nullptr,
2852+
ParseDeclarationSpecifiers(DS, TemplateInfo, AS, DSC, nullptr,
28522853
AllowImplicitTypename);
28532854

28542855
// Validate declspec for type-name.
@@ -2927,7 +2928,7 @@ static bool isValidAfterIdentifierInDeclarator(const Token &T) {
29272928
/// other pieces of declspec after it, it returns true.
29282929
///
29292930
bool Parser::ParseImplicitInt(DeclSpec &DS, CXXScopeSpec *SS,
2930-
const ParsedTemplateInfo &TemplateInfo,
2931+
ParsedTemplateInfo &TemplateInfo,
29312932
AccessSpecifier AS, DeclSpecContext DSC,
29322933
ParsedAttributes &Attrs) {
29332934
assert(Tok.is(tok::identifier) && "should have identifier");
@@ -3489,7 +3490,7 @@ Parser::DiagnoseMissingSemiAfterTagDefinition(DeclSpec &DS, AccessSpecifier AS,
34893490
/// 'friend': [C++ dcl.friend]
34903491
/// 'constexpr': [C++0x dcl.constexpr]
34913492
void Parser::ParseDeclarationSpecifiers(
3492-
DeclSpec &DS, const ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS,
3493+
DeclSpec &DS, ParsedTemplateInfo &TemplateInfo, AccessSpecifier AS,
34933494
DeclSpecContext DSContext, LateParsedAttrList *LateAttrs,
34943495
ImplicitTypenameContext AllowImplicitTypename) {
34953496
if (DS.getSourceRange().isInvalid()) {
@@ -7736,8 +7737,9 @@ void Parser::ParseParameterDeclarationClause(
77367737
Diag(ThisLoc, diag::err_requires_expr_explicit_object_parameter);
77377738
}
77387739

7739-
ParseDeclarationSpecifiers(DS, /*TemplateInfo=*/ParsedTemplateInfo(),
7740-
AS_none, DeclSpecContext::DSC_normal,
7740+
ParsedTemplateInfo TemplateInfo;
7741+
ParseDeclarationSpecifiers(DS, TemplateInfo, AS_none,
7742+
DeclSpecContext::DSC_normal,
77417743
/*LateAttrs=*/nullptr, AllowImplicitTypename);
77427744

77437745
DS.takeAttributesFrom(ArgDeclSpecAttrs);

0 commit comments

Comments
 (0)