File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -883,6 +883,9 @@ DeclarationFragments DeclarationFragmentsBuilder::getFragmentsForCXXMethod(
883
883
if (Method->isVolatile ())
884
884
Fragments.append (" volatile" , DeclarationFragments::FragmentKind::Keyword)
885
885
.appendSpace ();
886
+ if (Method->isVirtual ())
887
+ Fragments.append (" virtual" , DeclarationFragments::FragmentKind::Keyword)
888
+ .appendSpace ();
886
889
887
890
// Build return type
888
891
DeclarationFragments After;
Original file line number Diff line number Diff line change @@ -45,11 +45,19 @@ class Foo {
45
45
// GETCOUNT-NEXT: ]
46
46
47
47
// RUN: FileCheck %s --input-file %t/output.symbols.json --check-prefix SETL
48
- void setLength (int length) noexcept ;
48
+ virtual void setLength (int length) noexcept ;
49
49
// SETL: "!testRelLabel": "memberOf $ c:@S@Foo@F@setLength#I# $ c:@S@Foo"
50
50
// SETL-LABEL: "!testLabel": "c:@S@Foo@F@setLength#I#"
51
51
// SETL: "declarationFragments": [
52
52
// SETL-NEXT: {
53
+ // SETL-NEXT: "kind": "keyword",
54
+ // SETL-NEXT: "spelling": "virtual"
55
+ // SETL-NEXT: },
56
+ // SETL-NEXT: {
57
+ // SETL-NEXT: "kind": "text",
58
+ // SETL-NEXT: "spelling": " "
59
+ // SETL-NEXT: },
60
+ // SETL-NEXT: {
53
61
// SETL-NEXT: "kind": "typeIdentifier",
54
62
// SETL-NEXT: "preciseIdentifier": "c:v",
55
63
// SETL-NEXT: "spelling": "void"
You can’t perform that action at this time.
0 commit comments