[PATCH] D34033: [clangd] Add parameter and return type information to completion results

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 8 07:25:53 PDT 2017


ilya-biryukov added inline comments.


================
Comment at: clangd/ClangdUnit.cpp:153
         Item.kind = getKind(Result.CursorKind);
+        Item.insertText = CCS->getTypedText();
         if (CCS->getBriefComment())
----------------
Should we also update sortText and filterText, which use label by default, just like insertText?


================
Comment at: test/clangd/completion.test:32
 # CHECK: {"jsonrpc":"2.0","id":1,"result":[
-# CHECK-DAG: {"label":"a","kind":5}
-# CHECK-DAG: {"label":"bb","kind":5}
-# CHECK-DAG: {"label":"ccc","kind":5}
+# CHECK-DAG: {"label":"a","kind":5,"detail":"int","insertText":"a"}
 # CHECK: ]}
----------------
Should we repeat repeat the checks added above here too?


================
Comment at: test/clangd/completion.test:41
 # CHECK: {"jsonrpc":"2.0","id":1,"result":[
-# CHECK-DAG: {"label":"a","kind":5}
-# CHECK-DAG: {"label":"bb","kind":5}
-# CHECK-DAG: {"label":"ccc","kind":5}
+# CHECK-DAG: {"label":"a","kind":5,"detail":"int","insertText":"a"}
 # CHECK: ]}
----------------
Again.
Should we repeat repeat the checks added above here too?


https://reviews.llvm.org/D34033





More information about the cfe-commits mailing list