From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) by sourceware.org (Postfix) with ESMTPS id 7EDE33858C52 for ; Thu, 18 Jan 2024 09:40:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7EDE33858C52 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7EDE33858C52 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d2b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705570861; cv=none; b=u6YuW5/STV4k+VQKZZRvnjEejavYA2mnZKtBk4UgBmICib7a4C2qgk8OIgDNTUIUh/iQmSmm3pFMuEgYkatKYOfwtMZjGlGcRA+avK+k+zoA0YMa58oRuksVE4M0G7LMEpKKAS1a9fh2i8gp7mgyyu09YvpoOMart5YF2Z0AqH8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705570861; c=relaxed/simple; bh=G+PF2V9CXCPcXGLqVpd9vE4WBe5sF/8et+UZgrZIY20=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=YE3noIkpjW7MZUSU9XFJEmTi3z2gfRBIvJ81Vu+zVkYRpFjaqyk9DmoDCRJfVRqjWOMpOf0TfDK1f3WvhjqeVACKp8/fYF3mNXiLoLl+ss4vKIiVpZoVhCZR6/UXcQ/NUozeOJIxhhgVaI0SZ8qtVsIOpv3XLUDTIYEt3dlP6xo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7bed82030faso69352039f.1 for ; Thu, 18 Jan 2024 01:40:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705570858; x=1706175658; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=HmceRzszROke9fhbBs0b8vkpA6/iUHFFv6jvMONyETQ=; b=XAEoy4JzwifFjplKbFQOLFIO7k1wvQ4YqD5VjyZV2ObyfNLTp2We0bCE7NvaDXPjqH DkRHaqn8/u3KMrZ2jTvTo+KO3Fh4bmeOGT87+kHl8YMTIJZtZQ2y/ilGukA9OSRPZJL7 C0iqmbbqvnE1/zwtHdJAjSBnaifg5ndfgAkQt3pvEQgeYvCMsZR9dJDxFXMSakTEv5Lk TtZqIAZAIHQGqwJbH6tXxiJuFRF6ZErR+iabFseO4nbBnPO3fIlieeEqkWBDMMCIsYwW 8zZNr4X/dl10H7NvJ3WtwvyA7PTD9pYYPOClkNlSf8UB8vodmnrXNDtzzMr/udtgjQ3s 5ppg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705570858; x=1706175658; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HmceRzszROke9fhbBs0b8vkpA6/iUHFFv6jvMONyETQ=; b=orXsNWZhUqWnQuezgHDSeruaZ4Qu+04sspePmwS2aVKsA1WnDPRVi1jQMzSEobZyFq i7TS82orsPKhV8PspA1UhB6BMoL/TgGcpK+KnZy+aUpyyepJihnkYhG6Yqv/hHU8Wm7M FgaPVxbthyrqFWt1rb6yOO3QiYhHElKH0UYqWPXcXsxJVVbDrLTq+SIqEuP3DCQ3OVAj /eu6G4euTH5qLpRgV3c0Dk0S0j7gs5OGbCfzF+nc6rejIYPnCBTy5g+p/IdmU3jrEPaZ O41sba4dJtLKMOcgd5t2YPyy6+lklj7KRuNDHTG7PZR1eCpm6ldNwC6z1bk7pLyJdeKG VMRA== X-Gm-Message-State: AOJu0YzddDM+tijhA7qDK0U/kO2NYDueJddxOsuOGntf7q2AGeYHv+vc FjihPF576LXu6U9SMi69eeJICx41tp0nZYqwieyvOGU6S7oc8BWRI8V0QlrUO7zIO4o/MTeJ/dS fllXF8hmMcRRlcPb8eRmp1YCtWsdd0jo+ X-Google-Smtp-Source: AGHT+IHg8G/V5b0KQm7YkX4Vw1+HMFdRzUSxwY7I1jjKJzqnJze/MhWQb6XecQSafUKo8B3BygvT22+B/XXpK+uUC5w= X-Received: by 2002:a6b:7301:0:b0:7bf:60bc:7f1e with SMTP id e1-20020a6b7301000000b007bf60bc7f1emr1141360ioh.1.1705570858566; Thu, 18 Jan 2024 01:40:58 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Rajeev Bansal Date: Thu, 18 Jan 2024 15:10:46 +0530 Message-ID: Subject: Re: Reporting unnecessary inclusion of header files. To: Jonathan Wakely Cc: gcc-help Content-Type: multipart/alternative; boundary="0000000000002a11ad060f35296e" X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --0000000000002a11ad060f35296e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Never mind, I got the answer I was looking for. Thanks for your help. Thanks, -Rajeev On Thu, Jan 18, 2024 at 3:08=E2=80=AFPM Jonathan Wakely wrote: > > > On Thu, 18 Jan 2024, 09:18 Rajeev Bansal, wrote: > >> Thanks Jonathan. I have C++ code as well in my project, it looks like >> iwyu is compatible with llvm+clang compiler, any idea it will work with = gcc >> as well? >> > > > I'm not sure what you mean. As I said, it is a clang-based tool. It works > with both C and C++. > > No, it won't work with GCC. It uses clang libraries. > > >> Thanks, >> -Rajeev >> >> On Thu, Jan 18, 2024 at 2:33=E2=80=AFPM Jonathan Wakely >> wrote: >> >>> >>> >>> On Wed, 17 Jan 2024, 23:47 Rajeev Bansal via Gcc-help, < >>> gcc-help@gcc.gnu.org> wrote: >>> >>>> Hi All, >>>> >>>> I am looking for someone help on header file inclusion in C/CPP code. >>>> Can >>>> gcc help me to report the unnecessary inclusion of header files in my >>>> project? If not what are the other ways I can do it? >>>> >>> >>> No, gcc can't help with this. But there's a clang-based tool for it: >>> https://include-what-you-use.org/ >>> >>> >>> >>> --0000000000002a11ad060f35296e--