CI->getFrontendOpts().DisableFree = false;
CI->getLangOpts()->CommentOpts.ParseAllComments = true;
CI->getLangOpts()->RetainCommentsFromSystemHeaders = true;
+
+ // Disable any dependency outputting, we don't want to generate files or write
+ // to stdout/stderr.
+ CI->getDependencyOutputOpts().ShowIncludesDest =
+ ShowIncludesDestination::None;
+ CI->getDependencyOutputOpts().OutputFile.clear();
+ CI->getDependencyOutputOpts().HeaderIncludeOutputFile.clear();
+ CI->getDependencyOutputOpts().DOTOutputFile.clear();
+ CI->getDependencyOutputOpts().ModuleDependencyOutputDir.clear();
return CI;
}
--- /dev/null
+# RUN: clangd -lit-test < %s | FileCheck -strict-whitespace %s
+{"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
+---
+{"jsonrpc":"2.0","method":"workspace/didChangeConfiguration","params":{"settings":{"compilationDatabaseChanges":{"/clangd-test/foo.c":
+{"workingDirectory":"/clangd-test", "compilationCommand": ["clang", "-c", "-Xclang", "--show-includes", "-Xclang", "-sys-header-deps", "foo.c"]}}}}}
+---
+{"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///foo.c","languageId":"cpp","version":1,"text":"int a;\n#include <stddef.h>"}}}
+#CHECK-NOT: Note: including file
+---
+{"jsonrpc":"2.0","id":3,"method":"shutdown"}
+---
+{"jsonrpc":"2.0","method":"exit"}