Nebiroth marked 12 inline comments as done.
Nebiroth added inline comments.


================
Comment at: test/clangd/did-change-configuration.test:33
+
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"file:///compile_commands.json","languageId":"json","version":1,"text":"[\n{\n"directory":"/",\n"command":"/usr/bin/c++-DGTEST_HAS_RTTI=0-D_GNU_SOURCE-D__STDC_CONSTANT_MACROS-D__STDC_FORMAT_MACROS-D__STDC_LIMIT_MACROS-Ilib/Demangle-I../lib/Demangle-I/usr/include/libxml2-Iinclude-I../include-fPIC-fvisibility-inlines-hidden-Werror=date-time-std=c++11-Wall-W-Wno-unused-parameter-Wwrite-strings-Wcast-qual-Wno-missing-field-initializers-pedantic-Wno-long-long-Wno-maybe-uninitialized-Wdelete-non-virtual-dtor-Wno-comment-O0-g-fno-exceptions-fno-rtti-o/foo.c.o-c/foo.c",\n"file":"/foo.c"\n},"}}}
+
----------------
ilya-biryukov wrote:
> clangd won't see this file. `didOpen` only sets contents for diagnostics, not 
> any other features.
> You would rather want to add more `# RUN:` directives at the top of the file 
> to create `compile_commands.json`, etc.
> 
> Writing it under root ('/') is obviously not an option. Lit tests allow you 
> to use temporary paths, this is probably an approach you could take. See [[ 
> https://llvm.org/docs/TestingGuide.html#substitutions | lit docs ]] for more 
> details.
Are there examples available on how to use this? I have to use a # RUN: to 
create a file and then use it's path in a workspace/didChangeConfiguration 
notification?


https://reviews.llvm.org/D39571



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to