[PATCH] D155581: [clangd][c++20] Add concept semantic highlighting test case
Jens Massberg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 04:55:38 PDT 2023
massberg created this revision.
massberg added a reviewer: sammccall.
Herald added subscribers: kadircet, arphaman.
Herald added a project: All.
massberg requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D155581
Files:
clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
Index: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
===================================================================
--- clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
+++ clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp
@@ -657,6 +657,7 @@
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(
@@ -886,10 +887,10 @@
// 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]];
}
@@ -1002,7 +1003,7 @@
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",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D155581.541461.patch
Type: text/x-patch
Size: 2270 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230718/17fa9b10/attachment.bin>
More information about the cfe-commits
mailing list