Skip to content

Commit

Permalink
[clangd][c++20] Add concept semantic highlighting test case
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D155581
  • Loading branch information
jensmassberg committed Aug 2, 2023
1 parent d790a21 commit 8af016a
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ sizeof...($TemplateParameter[[Elements]]);
void $Function_def[[Bar]]($Concept[[Fooable]] $TemplateParameter[[auto]] $Parameter_def[[x]]) {}
template$Bracket[[<]]$Concept[[Fooable]] auto $TemplateParameter_def_readonly[[x]]$Bracket[[>]] void $Function_def[[Boo]]() {}
bool $Variable_def[[b]] = $Concept[[Fooable]]$Bracket[[<]]int$Bracket[[>]];
)cpp",
// Dependent template name
R"cpp(
Expand Down Expand Up @@ -886,10 +887,10 @@ sizeof...($TemplateParameter[[Elements]]);
// Issue 1222: readonly modifier for generic parameter
R"cpp(
template $Bracket[[<]]typename $TemplateParameter_def[[T]]$Bracket[[>]]
auto $Function_def[[foo]](const $TemplateParameter[[T]] $Parameter_def_readonly[[template_type]],
const $TemplateParameter[[auto]] $Parameter_def_readonly[[auto_type]],
auto $Function_def[[foo]](const $TemplateParameter[[T]] $Parameter_def_readonly[[template_type]],
const $TemplateParameter[[auto]] $Parameter_def_readonly[[auto_type]],
const int $Parameter_def_readonly[[explicit_type]]) {
return $Parameter_readonly[[template_type]]
return $Parameter_readonly[[template_type]]
$Operator_userDefined[[+]] $Parameter_readonly[[auto_type]]
$Operator_userDefined[[+]] $Parameter_readonly[[explicit_type]];
}
Expand Down Expand Up @@ -1002,7 +1003,7 @@ sizeof...($TemplateParameter[[Elements]]);
template $Bracket[[<]]class $TemplateParameter_def[[T]]$Bracket[[>]]
class $Class_def[[B]] {
template $Bracket[[<]]class $TemplateParameter_def[[U]]$Bracket[[>]] void $Method_def[[foo]]($TemplateParameter[[U]]) { }
template$Bracket[[<]]$Bracket[[>]] void $Method_def[[foo]]$Bracket[[<]]int$Bracket[[>]](int) { }
template$Bracket[[<]]$Bracket[[>]] void $Method_def[[foo]]$Bracket[[<]]int$Bracket[[>]](int) { }
friend void $Function_decl[[foo]]$Bracket[[<]]$Bracket[[>]]($TemplateParameter[[T]]);
};
)cpp",
Expand Down

0 comments on commit 8af016a

Please sign in to comment.