[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,192 @@ +// RUN: %clang_cc1 %s -O0 -Wstrict-aliasing -S -o %t -verify=quiet +// RUN: %clang_cc1 %s -O2 -Wstrict-aliasing=0 -S -o %t -verify=quiet +// RUN: %clang_cc1 %s -O2 -Wno-strict-aliasing -S -o %t -verify=quiet +// RUN: %clang_cc1 %s -O2 -Wstrict-aliasing=1 -S -o %

[clang] [clang] Strict aliasing warning ala GCC [PR50066] (PR #74155)

2023-12-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: Add @shafik who authors https://gist.github.com/shafik/848ae25ee209f698763cffee272a58f8 ("Although clang allows these flags it apparently does not actually implement the warnings") > [*] I implemented what turned into GCC's level=1 way back when. Cool! FWIW the GCC doc is ht

[clang] [Driver] Add riscv64-suse-linux triple (PR #74513)

2023-12-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: Sorry for causing you trouble but I think removing special cases from these `static const char *const XXXTriples[]` is intentional and we shall not add special cases for vendors. See https://github.com/llvm/llvm-project/issues/72256#issuecomment-1842148887 https://github.co

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Mingming Liu via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Bill Wendling via cfe-commits
bwendling wrote: Could you add the .c and .sh files? I'll try to recreate it on my end though. https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[mlir] [flang] [llvm] [compiler-rt] [libcxx] [clang-tools-extra] [clang] [mlir] Fix a zero stride canonicalizer crash (PR #74200)

2023-12-05 Thread Rik Huijzer via cfe-commits
https://github.com/rikhuijzer closed https://github.com/llvm/llvm-project/pull/74200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-05 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Using the same added ICP test, profile matching on local-linkage `_ZL7callee0v` using `clang++ -v -fuse-ld=lld -O2 -fprofile-use=thinlto_icall_prom.profdata ` , as [this](https://gist.github.com/minglotus-6/11817ba645c6b12cd7116f41bfb1185e) pgo-instr-use output shows. How

[clang] [clang] Disable missing definition warning on pure virtual functions (PR #74510)

2023-12-05 Thread via cfe-commits
cor3ntin wrote: Can you add a release note indicating https://github.com/llvm/llvm-project/issues/74016 was fixed? Otherwise LGTM. If you wanted to make a follow up {R to rename `isPure` to `isPureVirtual`, i think that might be helpful (to avoid confusion with the `gnu::pure` attribute) http

[clang] [libc] [llvm] [clang-tools-extra] [compiler-rt] [flang] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-05 Thread via cfe-commits
https://github.com/antangelo updated https://github.com/llvm/llvm-project/pull/74265 >From a8e841657b9816a78f6eb1520c8513454fe0008b Mon Sep 17 00:00:00 2001 From: Antonio Abbatangelo Date: Tue, 28 Nov 2023 21:19:13 -0500 Subject: [PATCH 1/2] [clang] Exclude non-template classes when checking if

[clang] [Clang] Generate the GEP instead of adding AST nodes (PR #73730)

2023-12-05 Thread Bill Wendling via cfe-commits
bwendling wrote: Okay. I should have fixed that issue. https://github.com/llvm/llvm-project/pull/73730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [compiler-rt] [lldb] [llvm] [lld] [libcxx] [flang] [clang-tools-extra] [libunwind] [mlir] [clang] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table a

2023-12-05 Thread Mingming Liu via cfe-commits
minglotus-6 wrote: Three tests failed on the windows build-bot (https://buildkite.com/llvm-project/github-pull-requests/builds/20392#018c3c8d-d4fd-41f7-b456-b1a4ded6dc61). Two (Transforms/PGOProfile/vtable_profile.ll and tools/llvm-profdata/vtable-value-prof-basic.test) of these three passed i

[clang] [clang-format][NFC] Refactor getting first/last non-comment of line (PR #74570)

2023-12-05 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74570 None >From a37925ae51d95e91d32ec50bc39a9b6e5b13c571 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 5 Dec 2023 23:31:28 -0800 Subject: [PATCH] [clang-format][NFC] Refactor getting first/last non-comment of li

[clang] [clang-format][NFC] Refactor getting first/last non-comment of line (PR #74570)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/74570.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.h (+5) - (modified) clang/lib/Format/UnwrappedLineFormatter.cpp (+6-13

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-05 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/74296 >From 65ce18117f99056aafcf58151b64f4243f4d5e26 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Mon, 4 Dec 2023 15:51:20 +0800 Subject: [PATCH 1/2] [clang][analyzer] Support `fflush` in the StreamChecker --- .../

[clang] [Sema] Warning for _Float16 passed to format specifier '%f' (PR #74439)

2023-12-05 Thread Haocong Lu via cfe-commits
Luhaocong wrote: > Should this only apply in C23 mode? Standard behavior until C23 is that > `_Float16` promotes to `double`. What about C++? It seems clang never support default argument promotions for _Float16, as described in https://github.com/llvm/llvm-project/blob/main/clang/docs/Langua

[clang] [clang][analyzer] Support `fflush` in the StreamChecker (PR #74296)

2023-12-05 Thread Ben Shi via cfe-commits
benshi001 wrote: > For now only the pre-condition is added, the `evalFflush` function is missing. I have also added `evalFflush`. https://github.com/llvm/llvm-project/pull/74296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

<    1   2   3   4   5