[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

[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

[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] [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

[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

[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

[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

[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

[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)

[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.

[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

[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

[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 , GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -

[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

[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

[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] Add separate C++23 extension flag for attrs on lambda (PR #74553)

2023-12-05 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/74553 >From 9be87da42e48895cf23d90a3ed735b7a36b1ccb3 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 6 Dec 2023 04:51:45 +0100 Subject: [PATCH 1/2] [clang] Add separate C++23 extension flag for attrs on lambda

[clang] [clang] Add separate C++23 extension flag for attrs on lambda (PR #74553)

2023-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Utkarsh Saxena (usx95) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/74553.diff 4 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticGroups.td (+3-1) - (modified)

[llvm] [clang-tools-extra] [clang] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Fangrui Song via cfe-commits
@@ -1,14 +1,49 @@ -; RUN: llvm-as < %s -o - | llc -filetype=asm | FileCheck %s +; RUN: llc -filetype=asm -mtriple=x86_64-unknown-linux-gnu %s -o - | FileCheck %s --check-prefixes=ELF MaskRay wrote: omit `-filetype=asm`

[clang] [clang] Add separate C++23 extension flag for attrs on lambda (PR #74553)

2023-12-05 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/74553 None >From 9be87da42e48895cf23d90a3ed735b7a36b1ccb3 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Wed, 6 Dec 2023 04:51:45 +0100 Subject: [PATCH] [clang] Add separate C++23 extension flag for attrs on lambda

[clang-tools-extra] [llvm] [clang] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,72 @@ +; RUN: llc -mtriple=arm64-unknown-linux-gnu %s -filetype=asm -o - | FileCheck %s --check-prefixes=ELF MaskRay wrote: Omit `-filetype=asm` (convention). https://github.com/llvm/llvm-project/pull/73686

[clang-tools-extra] [llvm] [clang] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Fangrui Song via cfe-commits
@@ -1809,6 +1814,255 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) { EmitToStreamer(*OutStreamer, TmpInst); } +void AArch64AsmPrinter::emitGlobalIFunc(Module , const GlobalIFunc ) { + if (!TM.getTargetTriple().isOSBinFormatMachO()) +return

[flang] [mlir] [llvm] [compiler-rt] [libcxx] [clang-tools-extra] [clang] [libc] [mlir][gpu] Support dynamic_shared_memory Op with vector dialect (PR #74475)

2023-12-05 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph approved this pull request. https://github.com/llvm/llvm-project/pull/74475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ANDROID: AArch64: Change default max-page-size from 4k to 16k (PR #70251)

2023-12-05 Thread via cfe-commits
pirama-arumuga-nainar wrote: cc: @nico https://github.com/llvm/llvm-project/pull/70251 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [XCOFF][obj2yaml] support parsing auxiliary symbols for XCOFF (PR #70642)

2023-12-05 Thread via cfe-commits
@@ -106,6 +126,210 @@ Error XCOFFDumper::dumpSections(ArrayRef Sections) { return Error::success(); } +Error XCOFFDumper::dumpFileAuxSym(XCOFFYAML::Symbol , + const XCOFFSymbolRef ) { + for (uint8_t I = 1; I <= Sym.NumberOfAuxEntries; ++I)

[compiler-rt] [clang] [llvm] [flang] [libc] [clang-tools-extra] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-05 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 closed https://github.com/llvm/llvm-project/pull/74230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] aeaae53 - [clang-format] Add "three dot" diff option to git-clang-format (#74230)

2023-12-05 Thread via cfe-commits
Author: Aiden Grossman Date: 2023-12-05T19:19:21-08:00 New Revision: aeaae5311b8d4bbcfe7ef5cff722ea36b038c0ad URL: https://github.com/llvm/llvm-project/commit/aeaae5311b8d4bbcfe7ef5cff722ea36b038c0ad DIFF:

[compiler-rt] [lld] [openmp] [libcxx] [mlir] [clang] [lldb] [llvm] [flang] [libc] [clang-tools-extra] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph edited https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [lld] [openmp] [libcxx] [mlir] [clang] [lldb] [llvm] [flang] [libc] [clang-tools-extra] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Mehdi Amini via cfe-commits
@@ -61,6 +63,7 @@ registerAllGPUToLLVMIRTranslations(DialectRegistry ) { registerLLVMDialectTranslation(registry); registerNVVMDialectTranslation(registry); registerROCDLDialectTranslation(registry); + registerSPIRVDialectTranslation(registry);

[compiler-rt] [lld] [openmp] [libcxx] [mlir] [clang] [lldb] [llvm] [flang] [libc] [clang-tools-extra] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Mehdi Amini via cfe-commits
@@ -0,0 +1,31 @@ +//===- SPIRVToLLVMIRTranslation.cpp - Translate SPIRV to LLVM IR --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

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

2023-12-05 Thread Mehdi Amini via cfe-commits
https://github.com/joker-eph approved this pull request. Thanks! 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

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
https://github.com/inclyc commented: Also please add release notes to let users know what has been changed :) See: `clang/docs/ReleaseNotes.rst` https://github.com/llvm/llvm-project/pull/74440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
@@ -918,6 +918,9 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">, Group, HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group, Visibility<[ClangOption, CC1Option]>; +def

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -std=c11 -fsyntax-only -verify -Wformat -Wformat-signedness %s + +int printf(const char *restrict format, ...); +int scanf(const char * restrict, ...); + +void test_printf_bool(_Bool x) +{ +printf("%d", x); // no-warning +

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
@@ -11815,6 +11815,18 @@ isArithmeticArgumentPromotion(Sema , const ImplicitCastExpr *ICE) { S.Context.getFloatingTypeOrder(From, To) < 0; } +static clang::analyze_format_string::ArgType::MatchKind inclyc wrote: ```suggestion static

[clang] [llvm] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-12-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: > when only have f extension but no d extension This can be simplified to "w/ f extension but w/o d extension" https://github.com/llvm/llvm-project/pull/73489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-12-05 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/73489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][RISCV] Change default abi when only have f extension but no d extension (PR #73489)

2023-12-05 Thread Fangrui Song via cfe-commits
@@ -1,4 +1,4 @@ -// Check target CPUs are correctly passed. +·// Check target CPUs are correctly passed. MaskRay wrote: Stray `.`? Please fix https://github.com/llvm/llvm-project/pull/73489 ___ cfe-commits mailing

[clang] [clang][analyzer][NFC] Supplement comments in `evalFtell` of StreamChecker (PR #74291)

2023-12-05 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/74291 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4699789 - [clang][analyzer][NFC] Supplement comments in `evalFtell` of StreamChecker (#74291)

2023-12-05 Thread via cfe-commits
Author: Ben Shi Date: 2023-12-06T10:26:30+08:00 New Revision: 4699789249e6945c46cdbecd1fee493cbe553c66 URL: https://github.com/llvm/llvm-project/commit/4699789249e6945c46cdbecd1fee493cbe553c66 DIFF: https://github.com/llvm/llvm-project/commit/4699789249e6945c46cdbecd1fee493cbe553c66.diff LOG:

[clang] [compiler-rt] [llvm] [clang-tools-extra] [flang] [libc] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-05 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/74230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8a68671 - [Driver, AArch64] Ensure -arch logic is Darwin-specific

2023-12-05 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-12-05T18:10:39-08:00 New Revision: 8a686716e360157ad5726560cc5ea61be647893c URL: https://github.com/llvm/llvm-project/commit/8a686716e360157ad5726560cc5ea61be647893c DIFF: https://github.com/llvm/llvm-project/commit/8a686716e360157ad5726560cc5ea61be647893c.diff

[clang] [compiler-rt] [llvm] [clang-tools-extra] [flang] [libc] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-05 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH 1/3] [clang-format] Add "three dot" diff option to

[clang] 7a49c30 - [Driver,test] Remove invalid -arch for non-Darwin AArch64 OSes

2023-12-05 Thread Fangrui Song via cfe-commits
Author: Fangrui Song Date: 2023-12-05T18:07:22-08:00 New Revision: 7a49c30b830471c39d09d71a6a617f2a7f3e711c URL: https://github.com/llvm/llvm-project/commit/7a49c30b830471c39d09d71a6a617f2a7f3e711c DIFF: https://github.com/llvm/llvm-project/commit/7a49c30b830471c39d09d71a6a617f2a7f3e711c.diff

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

2023-12-05 Thread Nathan Chancellor via cfe-commits
nathanchance wrote: For what it's worth, I see a new crash on the latest version of this PR, in case it is not known. ``` $ make -skj"$(nproc)" ARCH=arm64 LLVM=1 mrproper allmodconfig net/ipv4/udp_tunnel_nic.o clang: /home/nathan/cbl/src/llvm-project/llvm/lib/IR/Instructions.cpp:3342: static

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread via cfe-commits
@@ -57,6 +57,16 @@ global variable or function should be in after translation. let Heading = "section, __declspec(allocate)"; } +def CodeModelDocs : Documentation { + let Category = DocCatVariable; + let Content = [{ +The ``model`` attribute allows you to use a different

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread via cfe-commits
https://github.com/heiher updated https://github.com/llvm/llvm-project/pull/72078 >From e3863873ab817dacf8680763bb42d91f005fe5ea Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 10 Nov 2023 21:07:48 -0600 Subject: [PATCH 1/4] [clang] Add per-global code model attribute This patch adds a

[clang] [clang-format] Add "three dot" diff option to git-clang-format (PR #74230)

2023-12-05 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 updated https://github.com/llvm/llvm-project/pull/74230 >From ae4097b53b90e31802be0be5c8a81fb74c81efc9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Sat, 2 Dec 2023 23:46:58 -0800 Subject: [PATCH 1/3] [clang-format] Add "three dot" diff option to

[clang] [clang] Enhance handling of Apple-specific '-arch'/'-target' option values (PR #72821)

2023-12-05 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/72821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: OK, thanks for such a detailed explanation! Closing https://github.com/llvm/llvm-project/pull/72821 as not needed. https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [clang-tools-extra] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Jon Roelofs via cfe-commits
@@ -1809,6 +1814,255 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) { EmitToStreamer(*OutStreamer, TmpInst); } +void AArch64AsmPrinter::emitGlobalIFunc(Module , const GlobalIFunc ) { + if (!TM.getTargetTriple().isOSBinFormatMachO()) +return

[llvm] [clang] Remove experimental from Vector Crypto extensions (PR #69000)

2023-12-05 Thread Brandon Wu via cfe-commits
https://github.com/4vtomat closed https://github.com/llvm/llvm-project/pull/69000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] Remove experimental from Vector Crypto extensions (PR #69000)

2023-12-05 Thread Brandon Wu via cfe-commits
4vtomat wrote: moved to the new [one](https://github.com/llvm/llvm-project/pull/74213) https://github.com/llvm/llvm-project/pull/69000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Fangrui Song via cfe-commits
MaskRay wrote: When the target triple is aarch64 and `-arch ` is specified, e.g. `--target=aarch64 -arch arm64e`, there is currently no warning/error, because `clang/lib/Driver/ToolChains/Arch/AArch64.cpp` claims `OPT_arch` in quite a few places. We can safely remove these references now that

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-05 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: @MaskRay Unfortunately, the case I was initially trying to fix still has a problem after applying this patch. Consider `LLVM_DEFAULT_TARGET_TRIPLE=aarch64-linux-musl`. In such a case, running `clang -arch arm64e -c test.c -###` will show us `"-triple"

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

2023-12-05 Thread Kai Sasaki via cfe-commits
Lewuathe wrote: @joker-eph Thank you. That gets clearer to me! 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

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

2023-12-05 Thread Bill Wendling via cfe-commits
bwendling wrote: The `__bdos` stuff is only a subset of the bounds checking code so we should focus on that. It's still messier than that, since it's not always going to be a pointer directly to the FAM (e.g. p->a.b.c.array[index]), but I'll give it a shot. I don't think it's going to be any

[llvm] [clang] [clang-tools-extra] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Ahmed Bougacha via cfe-commits
https://github.com/ahmedbougacha edited https://github.com/llvm/llvm-project/pull/73686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Ahmed Bougacha via cfe-commits
@@ -1809,6 +1814,255 @@ void AArch64AsmPrinter::emitInstruction(const MachineInstr *MI) { EmitToStreamer(*OutStreamer, TmpInst); } +void AArch64AsmPrinter::emitGlobalIFunc(Module , const GlobalIFunc ) { + if (!TM.getTargetTriple().isOSBinFormatMachO()) +return

[llvm] [clang] [clang-tools-extra] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Ahmed Bougacha via cfe-commits
@@ -144,7 +144,12 @@ bool CallLowering::lowerCall(MachineIRBuilder , const CallBase , // Try looking through a bitcast from one function type to another. // Commonly happens with calls to objc_msgSend(). const Value *CalleeV = CB.getCalledOperand()->stripPointerCasts();

[clang] [llvm] [clang-tools-extra] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Ahmed Bougacha via cfe-commits
@@ -882,8 +882,11 @@ class AsmPrinter : public MachineFunctionPass { GCMetadataPrinter *getOrCreateGCPrinter(GCStrategy ); void emitGlobalAlias(Module , const GlobalAlias ); - void emitGlobalIFunc(Module , const GlobalIFunc ); +protected: + virtual void

[clang-tools-extra] bb0f162 - [clang][tidy] Fix build failure after 07157db

2023-12-05 Thread Jan Svoboda via cfe-commits
Author: Jan Svoboda Date: 2023-12-05T15:52:57-08:00 New Revision: bb0f162b3acfab3146807ab1e01946596d9921f9 URL: https://github.com/llvm/llvm-project/commit/bb0f162b3acfab3146807ab1e01946596d9921f9 DIFF: https://github.com/llvm/llvm-project/commit/bb0f162b3acfab3146807ab1e01946596d9921f9.diff

[clang] [Clang] Emit TBAA info for enums in C (PR #73326)

2023-12-05 Thread John McCall via cfe-commits
rjmccall wrote: This seems conservatively correct, yeah. My reading is that we could also use the underlying type as a parent type for the TBAA metadata: enums are compatible with their underlying type, but two enums with the same underlying type are not compatible with each other. But this

[clang] [clang-tools-extra] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/67839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 07157db - [clang][tidy] Ensure rewriter has the correct CWD (#67839)

2023-12-05 Thread via cfe-commits
Author: Jan Svoboda Date: 2023-12-05T15:35:55-08:00 New Revision: 07157db81d4421ced9fcf9a2002255c2a3a80d49 URL: https://github.com/llvm/llvm-project/commit/07157db81d4421ced9fcf9a2002255c2a3a80d49 DIFF: https://github.com/llvm/llvm-project/commit/07157db81d4421ced9fcf9a2002255c2a3a80d49.diff

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/67839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang-tools-extra] [compiler-rt] [libcxx] [lld] [llvm] [clang] [libc] [lldb] [Clang] Fix linker error for function multiversioning (PR #71706)

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

[clang] cee5b87 - [Clang] Fix linker error for function multiversioning (#71706)

2023-12-05 Thread via cfe-commits
Author: elizabethandrews Date: 2023-12-05T18:11:53-05:00 New Revision: cee5b8777fa98312b05bf8aa81554910a8f867c5 URL: https://github.com/llvm/llvm-project/commit/cee5b8777fa98312b05bf8aa81554910a8f867c5 DIFF:

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-05 Thread Jan Svoboda via cfe-commits
@@ -157,6 +157,25 @@ #define LLVM_DEPRECATED(MSG, FIX) [[deprecated(MSG)]] #endif +// clang-format off +#if defined(__clang__) || defined(__GNUC__) +#define LLVM_IGNORE_DEPRECATIONS_OF_DECLARATIONS_BEGIN \ jansvoboda11 wrote: Maybe

[clang] [clang-tools-extra] [lldb] [llvm] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2023-12-05 Thread Adrian Prantl via cfe-commits
adrian-prantl wrote: SGTM, maybe wait one more day for @JDevlieghere to chime in. https://github.com/llvm/llvm-project/pull/73067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Trying to discuss both __bdos and the array bounds sanitizer changes in the same review is making things confusing to discuss. It seems like they have significant differences. For array bounds sanitizer, take your example: ``` struct s { struct s *p; int count;

[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

2023-12-05 Thread Björn Svensson via cfe-commits
bjosv wrote: Updated the check to be derived from the original check instead of an alias. https://github.com/llvm/llvm-project/pull/73119 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang-tidy] Add check hicpp-ignored-remove-result (PR #73119)

2023-12-05 Thread Björn Svensson via cfe-commits
https://github.com/bjosv updated https://github.com/llvm/llvm-project/pull/73119 From 91cf412abcfd231ab399c3e44c6a9bc14109537c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Svensson?= Date: Tue, 21 Nov 2023 23:30:07 +0100 Subject: [PATCH 1/3] [clang-tidy] Add check

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

2023-12-05 Thread Bill Wendling via cfe-commits
bwendling wrote: > I mean, the base case should be "return nullptr", and you should only > explicitly list out expressions you know we need to handle. We shouldn't need > to explicitly mention VisitUnaryPostDec etc. The expression can be arbitrarily complex. For instance this: ``` struct s {

[clang-tools-extra] [llvm] [clang] [llvm] Support IFuncs on Darwin platforms (PR #73686)

2023-12-05 Thread Jon Roelofs via cfe-commits
jroelofs wrote: ping https://github.com/llvm/llvm-project/pull/73686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > > And ideally, the recursive visit should list those expressions explicitly, > > instead aborting on ones we know are bad. > > I'm sorry, I don't understand what you're talking about here. The whole point > of the recursive visit is to find a suitable base pointer. If

[clang-tools-extra] [lldb] [llvm] [clang] [lldb][test] Apply @expectedFailureAll/@skipIf early for debug_info tests (PR #73067)

2023-12-05 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: > Is this a performance optimization or a function al change? Neither. This should only affect tests, and the set of tests we skip/mark as xfail should not change, we just generally know about it earlier in the test setup. https://github.com/llvm/llvm-project/pull/73067

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM w/ minor comments https://github.com/llvm/llvm-project/pull/74512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread Shafik Yaghmour via cfe-commits
@@ -8395,10 +8395,11 @@ void Sema::CheckShadow(NamedDecl *D, NamedDecl *ShadowedDecl, unsigned WarningDiag = diag::warn_decl_shadow; SourceLocation CaptureLoc; - if (isa(D) && isa(ShadowedDecl) && NewDC && - isa(NewDC)) { + if (isa(D) && NewDC && isa(NewDC)) {

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/74512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread Shafik Yaghmour via cfe-commits
@@ -179,3 +179,21 @@ void f() { #endif } } + +namespace GH71976 { +struct A { + int b = 5; + int foo() { +return [b = b]() { return b; }(); shafik wrote: ```suggestion return [b = b]() { return b; }(); // no diagnostic, init-capture does not shadow

[clang] [clang] Avoid -Wshadow warning when init-capture named same as class field (PR #74512)

2023-12-05 Thread Shafik Yaghmour via cfe-commits
@@ -179,3 +179,21 @@ void f() { #endif } } + +namespace GH71976 { +struct A { + int b = 5; + int foo() { +return [b = b]() { return b; }(); + } +}; + +struct B { + int a; + void foo() { +auto b = [a = this->a] { shafik wrote: ```suggestion

[clang] [libc] [compiler-rt] [libcxx] [lld] [mlir] [clang-tools-extra] [llvm] [flang] [openmp] [lldb] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-12-05 Thread Fabian Mora via cfe-commits
https://github.com/fabianmcg closed https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro updated https://github.com/llvm/llvm-project/pull/74510 >From 5582cfacf106a7c00912fcef0d116d6fa58e064b Mon Sep 17 00:00:00 2001 From: Charalampos Mitrodimas Date: Tue, 5 Dec 2023 11:46:56 +0200 Subject: [PATCH] [clang] Disable missing definition warning on pure

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

2023-12-05 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff d6fbd96e5eaf3e8acbf1b43dce7a311352907567 1140e0094137614ad9917276f5324cbea4f2e0f9 --

[clang] [clang] Exclude non-template classes when checking if constraint refers to containing template arguments (PR #74265)

2023-12-05 Thread via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -std=c++20 -verify %s + +template +concept C = true; + +class non_temp { +template T> +friend void f(); + +non_temp(); +}; + +template T> +void f() { +auto v = non_temp(); +} + +template +class temp { +template T> +

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

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro edited https://github.com/llvm/llvm-project/pull/74510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
@@ -4952,7 +4952,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation, std::make_pair(Function, PointOfInstantiation)); } else if (TSK == TSK_ImplicitInstantiation) { if (AtEndOfTU && !getDiagnostics().hasErrorOccurred() && -

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

2023-12-05 Thread Charalampos Mitrodimas via cfe-commits
https://github.com/charmitro updated https://github.com/llvm/llvm-project/pull/74510 >From 1140e0094137614ad9917276f5324cbea4f2e0f9 Mon Sep 17 00:00:00 2001 From: Charalampos Mitrodimas Date: Tue, 5 Dec 2023 11:46:56 +0200 Subject: [PATCH] [clang] Disable missing definition warning on pure

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

2023-12-05 Thread Bill Wendling via cfe-commits
bwendling wrote: > And ideally, the recursive visit should list those expressions explicitly, > instead aborting on ones we know are bad. I'm sorry, I don't understand what you're talking about here. The whole point of the recursive visit is to find a suitable base pointer. If we run across

[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
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-05 Thread Andrzej Warzyński via cfe-commits
banach-space wrote: > Are you going to add an entry to the [Release > Notes](https://github.com/llvm/llvm-project/blob/main/flang/docs/ReleaseNotes.md)? Once this change lands, yes. https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits

[clang] [llvm] [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
https://github.com/minglotus-6 edited https://github.com/llvm/llvm-project/pull/74008 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [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 , GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -

[clang] [flang] [llvm] [clang-tools-extra] [mlir] [lldb] [compiler-rt] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Zequan Wu via cfe-commits
@@ -702,6 +708,8 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVMAP_COMMON __llvm_covmap #define INSTR_PROF_COVFUN_COMMON __llvm_covfun #define INSTR_PROF_ORDERFILE_COMMON __llvm_orderfile ZequanWu wrote: Done.

[mlir] [llvm] [lldb] [flang] [clang] [compiler-rt] [clang-tools-extra] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Can you break up all the changes to tests that replace > `-debug-info-correlate` with `--profile-correlate=debug-info` into a separate > PR to reduce the size of this PR? Done. https://github.com/llvm/llvm-project/pull/69493 ___

[libc] [flang] [clang] [compiler-rt] [libcxx] [llvm] Ensure `lli --force-interpreter` disables the OrcJIT too (PR #73717)

2023-12-05 Thread Nate Voorhies via cfe-commits
https://github.com/nvoorhies closed https://github.com/llvm/llvm-project/pull/73717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [lld] [compiler-rt] [libcxx] [clang] [llvm] [lldb] [libc] [flang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-12-05 Thread via cfe-commits
https://github.com/DanielKristofKiss approved this pull request. https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2023-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If you do need a map for something, I'd prefer to make it as narrow as possible. For example, I can imagine you could need to specifically look up the corresponding allocation for a CompoundLiteralExpr; that might make sense. I don't think we should need to look up

[clang-tools-extra] [clang] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-05 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/67839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >