From nobody Tue May 21 15:51:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1689349506; cv=none; d=zohomail.com; s=zohoarc; b=PpsIFQFgv8mX3d4GGzbREa8FNlcrEl9LWP1xr+iYsf9zcxUuAqhAxEaH0ZJTVWdQkgt6kfeGttWwMs/S0zMwcl5CZpVGXVg1W6aK4VMQqCuHu3/LPjHeCkvtyw5R+2VYVlQGB2dHdLTijAeTcJlwYT+dy4tQaslmWFl4Asm5TSw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689349506; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=cSPIw/WpFg98X0u9hW1Q63hCoP1q2Vkcj1+2hJaDt8Q=; b=icdDxs1OJfn+vCABKV0pdwZOo+vdWJuXoIBYPcUSmQMuihAhaxHdLoqq49zcb3aUNn97tSSLCeSt4NQfkN0sKOrxtzdtgVnuLtBKby9akSWeibiE3R86upg4NUnAaQykntOOxi5fTsloc5UU8kRmlH9HJ8gZv0+mxYogwEbARPA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1689349506455831.2023296911758; Fri, 14 Jul 2023 08:45:06 -0700 (PDT) Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-454-dbTSL9YyOxOCCw6HXPNTEw-1; Fri, 14 Jul 2023 11:45:01 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5B0283806711; Fri, 14 Jul 2023 15:44:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3F8F040C2063; Fri, 14 Jul 2023 15:44:59 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 0FB3119465A2; Fri, 14 Jul 2023 15:44:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AD707194658F for ; Fri, 14 Jul 2023 15:44:38 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 9EBA110C95; Fri, 14 Jul 2023 15:44:38 +0000 (UTC) Received: from himantopus.redhat.com (unknown [10.22.32.196]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C55F10E5F; Fri, 14 Jul 2023 15:44:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689349505; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=cSPIw/WpFg98X0u9hW1Q63hCoP1q2Vkcj1+2hJaDt8Q=; b=Unz/qtkPXl2nIj2adQEK8FYFk4N1Wf0/PZv4YaynXHytigS7+5WSrVqZp78I1Vh9fbfuaV 32MHgW6QzuBTspMq4vCS3D5C0kJnuizlO+LVDE0uIso1qHtEngcDRG1ttFyW81DZobvlVI k1yTAaKSrSiOTKF/ooun6nrm183R0ek= X-MC-Unique: dbTSL9YyOxOCCw6HXPNTEw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH] docs: expand clangd instructions Date: Fri, 14 Jul 2023 10:44:37 -0500 Message-ID: <20230714154437.2982081-1-jjongsma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tim@seoss.co.uk Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1689349507816100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Add some additional information about running clangd for LSP when clang is not your normal compiler. Signed-off-by: Jonathon Jongsma Reviewed-By: Tim Small Reviewed-by: Michal Privoznik --- docs/clangd.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/clangd.rst b/docs/clangd.rst index 93570ae178..25529948f6 100644 --- a/docs/clangd.rst +++ b/docs/clangd.rst @@ -40,6 +40,14 @@ Create a separate build directory with a ``clangd`` comp= atible =20 CC=3Dclang CXX=3Dclang++ meson setup build-clang =20 +There are a small number of source files that are generated as part of the +build process. In order to navigate this generated source code, you should= also +execute a build in this directory: + +:: + + ninja -C build-clang + Point ``clangd`` (v12 or later) at the correct ``compile_commands.json`` by placing the following into a ``.clangd`` file in the root of the project: @@ -49,3 +57,12 @@ Point ``clangd`` (v12 or later) at the correct --- CompileFlags: CompilationDatabase: "build-clang" + + +Please note that if you are not using clang for your daily development, the +``build-clang`` directory can get out of sync with the current state of the +project over time. When you update your git checkout, new files may be add= ed or +configuration options changed and ``clangd`` may start to behave unpredict= ably. +In this case, you will need to update your compilation database by doing a= new +build in the ``build-clang`` directory. This should allow clangd to work +reliably again. --=20 2.41.0