Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang/docs/ReleaseNotes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@ Bug Fixes to C++ Support
- Fixed a bug where bounds of partially expanded pack indexing expressions were checked too early. (#GH116105)
- Fixed an assertion failure caused by using ``consteval`` in condition in consumed analyses. (#GH117385)
- Fix a crash caused by incorrect argument position in merging deduced template arguments. (#GH113659)
- Fixed a parser crash when using pack indexing as a nested name specifier. (#GH119072)
- Fixed an assertion failure caused by mangled names with invalid identifiers. (#GH112205)

Bug Fixes to AST Handling
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Parse/ParseExpr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ ExprResult Parser::ParseCastExpression(CastParseKind ParseKind,
// If the token is not annotated, then it might be an expression pack
// indexing
if (!TryAnnotateTypeOrScopeToken() &&
Tok.is(tok::annot_pack_indexing_type))
Tok.isOneOf(tok::annot_pack_indexing_type, tok::annot_cxxscope))
return ParseCastExpression(ParseKind, isAddressOfOperand, isTypeCast,
isVectorLiteral, NotPrimaryExpression);
}
Expand Down
9 changes: 9 additions & 0 deletions clang/test/Parser/cxx2c-pack-indexing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,12 @@ struct SS {
}
};
}

namespace GH119072 {

template<typename... Ts>
void foo() {
decltype(Ts...[0]::t) value;
}

}
Loading