From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 4713C3858D33 for ; Tue, 28 Feb 2023 09:18:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4713C3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52d.google.com with SMTP id ec43so36990745edb.8 for ; Tue, 28 Feb 2023 01:18:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=dRX1RDXgsCgtzCPPv8lguUP+qkgdpNAvjH0dLh3IvcI=; b=jzLrj5jryvY4dKUzttmZoV5gXOW59TMP/5sVM+pBrK8HH6ldFXOEpMtnRnLDAU1xUz 7UvenUvbDa9aHPJwEf93AW6Tj2FBiUYsIERhLQL5Zue5utqX1wafcGnETV8S5UBR5guj jFVgDCrOFGRB37Pvi8ZugfY9v1ckLY52xQcqys5BMA8rVtlxwRC5CDxtjFuA3hMztEkU kTqQJkktdHvUd80u76Th70BgNWR0aI44rMRrO5Br0xcCwzqXYtP+YOS/fkWK3RZMCrAs AJ0x0q/suf+W/D6gQLnA+JHZ4JORCC3+ALDfMXiLDDTUkQjrPSgywapaUMqENgADGuWM J8Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dRX1RDXgsCgtzCPPv8lguUP+qkgdpNAvjH0dLh3IvcI=; b=vQ0Ng/AeNcBrZ9XcN8U58Hmkxe9bAQSNPt5MzUHoGx6P9F+4UHT5FAbI+yCVbSQosB CYmt+dQbgJvILr8mgSQ5Xpo4zyJeOA3bGz9nGfUQp6qwZs1tGjaZa6oy/KeM4Y32V3hB yOmzavBqWZpzgyR/UgS4iF05qtkYpCfgRTDXhkwWg/UbbHtFCWP/4uha0bPVPNUgvqBm SzRwNJ830B2AO4ThHGuUXLl7uUQncHY37m/78NEn8CUX6h1Z9BnX+LTL2qwvhA+8W9An atM8/01IKczzXOnWEK377v43Qmejhnjw8gEK3S7ZQ0b5Ekz4FWYQY5LUkR1zWwmJIuZu DB4Q== X-Gm-Message-State: AO0yUKV9oQBrACrlZiuA1l0URpJWzlMhzVnUIBPNMcKFIo7rkhgqXVAe 0Y3bJT/L71sSotYPhBtoiNu9PeYG++Q= X-Google-Smtp-Source: AK7set+NQx+7GUuc/u2QZ8n00Fd8XOXKtzqkw+TQXh5/m+3k8w7Bfw290Gv2XfqSALQB84erPGoIWg== X-Received: by 2002:a17:906:3083:b0:8aa:b866:af5a with SMTP id 3-20020a170906308300b008aab866af5amr1822085ejv.36.1677575898825; Tue, 28 Feb 2023 01:18:18 -0800 (PST) Received: from smtpclient.apple ([213.55.226.53]) by smtp.gmail.com with ESMTPSA id w30-20020a50d79e000000b004acb696a0f6sm4104805edi.91.2023.02.28.01.18.17 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Feb 2023 01:18:18 -0800 (PST) From: Shengyu Huang Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_3B3F7770-5C17-40F8-A223-1FBC2DA1DB3E" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: Re: [GSoC][Static Analyzer] Some questions and request for a small patch to work on Date: Tue, 28 Feb 2023 10:18:06 +0100 In-Reply-To: <594374fad6f19b956b3f0e6e5ce04ad51205186b.camel@redhat.com> Cc: GCC Development To: David Malcolm References: <960EE623-1B17-4321-B77E-FBCD9496BE1F@gmail.com> <40fbb064f56845908f797400e5d9443b6cf97fe4.camel@redhat.com> <594374fad6f19b956b3f0e6e5ce04ad51205186b.camel@redhat.com> X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Spam-Status: No, score=-1.2 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 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: --Apple-Mail=_3B3F7770-5C17-40F8-A223-1FBC2DA1DB3E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Dave, Do you want me to follow the steps 7-10 (https://gcc-newbies-guide.readthed= ocs.io/en/latest/how-to-improve-the-location-of-a-diagnostic.html) or tell = you where I add the code simply? Basically, I added warning_at (DECL_SOURCE_LOCATION (node->decl), 0, "hello world, I=E2=80=99m= compiling %qE", node->decl); to the loop of cgraph_node inside impl_run_checkrs (logger *logger) of anal= yzer/engine.cc .=20 (I also tried adding this code to cgraph_node::cgraphunit.cc in cgraphunit.cc , and then I found out th= e warning_at is different in that scope=E2=80=A6but inform would work.) Best, Shengyu P.S. Shall I continue put mailing list in my cc? Not sure the community wan= ts to receive that many GSoC related emails. > On 22 Feb 2023, at 16:43, David Malcolm wrote: >=20 > Sorry, I was unclear; I was referring to this part of my guide: > https://gcc-newbies-guide.readthedocs.io/en/latest/getting-started.html#h= ello-world-from-the-compiler >=20 > i.e. try writing a new warning that simply emits something like: >=20 > test.c:2:1: warning: hello world, I'm compiling 'main' > 2 | int main () > | ^~~~ >=20 > for each function that it sees. --Apple-Mail=_3B3F7770-5C17-40F8-A223-1FBC2DA1DB3E--