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(
883883 if (Method->isVolatile ())
884884 Fragments.append (" volatile" , DeclarationFragments::FragmentKind::Keyword)
885885 .appendSpace ();
886+ if (Method->isVirtual ())
887+ Fragments.append (" virtual" , DeclarationFragments::FragmentKind::Keyword)
888+ .appendSpace ();
886889
887890 // Build return type
888891 DeclarationFragments After;
Original file line number Diff line number Diff line change @@ -45,11 +45,19 @@ class Foo {
4545 // GETCOUNT-NEXT: ]
4646
4747 // 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 ;
4949 // SETL: "!testRelLabel": "memberOf $ c:@S@Foo@F@setLength#I# $ c:@S@Foo"
5050 // SETL-LABEL: "!testLabel": "c:@S@Foo@F@setLength#I#"
5151 // SETL: "declarationFragments": [
5252 // 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: {
5361 // SETL-NEXT: "kind": "typeIdentifier",
5462 // SETL-NEXT: "preciseIdentifier": "c:v",
5563 // SETL-NEXT: "spelling": "void"
You can’t perform that action at this time.
0 commit comments