Author: Jens Massberg Date: 2023-08-02T10:37:30+02:00 New Revision: 8af016aefd8391d083cdf745420826ce162a41a5
URL: https://github.com/llvm/llvm-project/commit/8af016aefd8391d083cdf745420826ce162a41a5 DIFF: https://github.com/llvm/llvm-project/commit/8af016aefd8391d083cdf745420826ce162a41a5.diff LOG: [clangd][c++20] Add concept semantic highlighting test case Differential Revision: https://reviews.llvm.org/D155581 Added: Modified: clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp Removed: ################################################################################ diff --git a/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp b/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp index 6eee6ec30ac024..da12accc7898b6 100644 --- a/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp +++ b/clang-tools-extra/clangd/unittests/SemanticHighlightingTests.cpp @@ -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( @@ -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]]; } @@ -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", _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits