[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-21 Thread Haojian Wu via cfe-commits
@@ -478,22 +444,38 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, CheckCoroObjArg = false; if (implicitObjectParamIsLifetimeBound(Callee) || CheckCoroObjArg) VisitLifetimeBoundArg(Callee, ObjectArg); +else if (EnableGSLAnaly

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-21 Thread Haojian Wu via cfe-commits
@@ -439,6 +378,8 @@ static void visitLifetimeBoundArguments(IndirectLocalPath &Path, Expr *Call, if (!Callee) return; + bool EnableGSLAnalysis = !Callee->getASTContext().getDiagnostics().isIgnored( hokein wrote: > Can we move this to VisitGSLPointerAr

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-21 Thread Owen Pan via cfe-commits
https://github.com/owenca deleted https://github.com/llvm/llvm-project/pull/101882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-21 Thread Owen Pan via cfe-commits
@@ -403,13 +416,25 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) { verifyFormat("f(/* aa = */\n" " );"); - FormatStyle NoBinPacking = getLLVMStyle(); - NoBinPacking.BinPackParamet

[clang] [clang] Merge lifetimebound and GSL code paths for lifetime analysis (PR #104906)

2024-08-21 Thread Haojian Wu via cfe-commits
https://github.com/hokein updated https://github.com/llvm/llvm-project/pull/104906 >From 773a03b25a94d991206f4b517eefdf3693e6a287 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 20 Aug 2024 10:22:44 +0200 Subject: [PATCH 1/3] [clang] Merge the lifetimebound and GSL code paths for lifetime

[clang] [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (PR #105610)

2024-08-21 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/2785 Here is the relevant piece of the b

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-21 Thread Owen Pan via cfe-commits
@@ -403,13 +416,29 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) { verifyFormat("f(/* aa = */\n" " );"); - FormatStyle NoBinPacking = getLLVMStyle(); - NoBinPacking.BinPackParamet

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-21 Thread Owen Pan via cfe-commits
https://github.com/owenca deleted https://github.com/llvm/llvm-project/pull/101882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Consolidate tests for default argument substitution (PR #105617)

2024-08-21 Thread Younan Zhang via cfe-commits
zyn0217 wrote: libcxx failures are unrelated. https://github.com/llvm/llvm-project/pull/105617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

2024-08-21 Thread Chuanqi Xu via cfe-commits
Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= , Jan =?utf-8?q?Kokemüller?= Message-ID: In-Reply-To: @@ -6926,11 +6926,26 @@ void Sema::AddOverloadCandidate( /// have linkage. So that all entities of the same should share one /// linkage. But in clang, differ

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-21 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/105043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-21 Thread kadir çetinkaya via cfe-commits
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && + const auto *Prev = BeforeLeft->Previous; + return Left

[clang] [clang-format] Correctly compute SplitPenalty of TrailingReturnArrow (PR #105613)

2024-08-21 Thread Owen Pan via cfe-commits
https://github.com/owenca milestoned https://github.com/llvm/llvm-project/pull/105613 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Expose static inline functions from GMF (PR #104701)

2024-08-21 Thread Jan Kokemüller via cfe-commits
@@ -6926,11 +6926,26 @@ void Sema::AddOverloadCandidate( /// have linkage. So that all entities of the same should share one /// linkage. But in clang, different entities of the same could have /// different linkage. -NamedDecl *ND = Function; -if (auto *Spe

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-21 Thread Owen Pan via cfe-commits
@@ -403,13 +416,29 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) { verifyFormat("f(/* aa = */\n" " );"); - FormatStyle NoBinPacking = getLLVMStyle(); - NoBinPacking.BinPackParamet

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-21 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/101882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (PR #101882)

2024-08-21 Thread Owen Pan via cfe-commits
@@ -403,13 +416,25 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) { verifyFormat("f(/* aa = */\n" " );"); - FormatStyle NoBinPacking = getLLVMStyle(); - NoBinPacking.BinPackParamet

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-21 Thread via cfe-commits
cor3ntin wrote: I would recommend creating an issue and see how ewg handles the new information before reaping out a lot of code. https://github.com/llvm/llvm-project/pull/101448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-21 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough closed https://github.com/llvm/llvm-project/pull/102691 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fde2d23 - [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (#102691)

2024-08-21 Thread via cfe-commits
Author: Ethan Luis McDonough Date: 2024-08-22T01:10:54-05:00 New Revision: fde2d23ee2a204050a210f2f7b290643a272f737 URL: https://github.com/llvm/llvm-project/commit/fde2d23ee2a204050a210f2f7b290643a272f737 DIFF: https://github.com/llvm/llvm-project/commit/fde2d23ee2a204050a210f2f7b290643a272f73

[clang] [llvm] [AsmWriter] Print `nan`, `pinf`, and `ninf` when applicable (PR #105618)

2024-08-21 Thread Matt Arsenault via cfe-commits
@@ -4387,12 +4387,12 @@ Simple Constants zeros. So '``s0x0001``' of type '``i16``' will be -1, not 1. **Floating-point constants** Floating-point constants use standard decimal notation (e.g. -123.421), exponential notation (e.g. 1.23421e+2), or a more precise -

[clang] [llvm] [AsmWriter] Print `nan`, `pinf`, and `ninf` when applicable (PR #105618)

2024-08-21 Thread Matt Arsenault via cfe-commits
@@ -4426,6 +4425,32 @@ represented by ``0xH`` followed by 4 hexadecimal digits. The bfloat 16-bit format is represented by ``0xR`` followed by 4 hexadecimal digits. All hexadecimal formats are big-endian (sign bit at the left). +Some of the special floating point values can b

[clang] [llvm] [AsmWriter] Print `nan`, `pinf`, and `ninf` when applicable (PR #105618)

2024-08-21 Thread Matt Arsenault via cfe-commits
@@ -4426,6 +4425,32 @@ represented by ``0xH`` followed by 4 hexadecimal digits. The bfloat 16-bit format is represented by ``0xR`` followed by 4 hexadecimal digits. All hexadecimal formats are big-endian (sign bit at the left). +Some of the special floating point values can b

[clang] [llvm] [AsmWriter] Print `nan`, `pinf`, and `ninf` when applicable (PR #105618)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-globalisel Author: Min-Yih Hsu (mshockwave) Changes Instead of hexidecimal values, print `nan`, `pinf`, and `ninf` when the floating point constant is equal to positive quiet NaN with zero payload, positive infinity, and

[clang] [Clang][NFC] Consolidate tests for default argument substitution (PR #105617)

2024-08-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/105617 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][NFC] Consolidate tests for default argument substitution (PR #105617)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Younan Zhang (zyn0217) Changes Follow-up on 8ac140f39. The test `SemaTemplate/default-parm-init.cpp` was introduced since the fix for #80288 and mainly did the following things: - Ensure the default arguments are properly substituted ins

[libunwind] [libunwind] Stop installing the mach-o module map (PR #105616)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Ian Anderson (ian-twilightcoder) Changes libunwind shouldn't know that compact_unwind_encoding.h is part of a MachO module that it doesn't own. Delete the mach-o module map, and let whatever is in charge of the mach-o directory be the

[clang] [Clang][NFC] Consolidate tests for default argument substitution (PR #105617)

2024-08-21 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/105617 Follow-up on 8ac140f39. The test `SemaTemplate/default-parm-init.cpp` was introduced since the fix for #80288 and mainly did the following things: - Ensure the default arguments are properly substituted inside

[clang] [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (PR #105610)

2024-08-21 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/105610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ded6dd2 - [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (#105610)

2024-08-21 Thread via cfe-commits
Author: h-vetinari Date: 2024-08-22T13:32:40+08:00 New Revision: ded6dd244cce3e683201a668ce321d4474baa8fb URL: https://github.com/llvm/llvm-project/commit/ded6dd244cce3e683201a668ce321d4474baa8fb DIFF: https://github.com/llvm/llvm-project/commit/ded6dd244cce3e683201a668ce321d4474baa8fb.diff LO

[clang] [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (PR #105610)

2024-08-21 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. Oh, I forgot it. Thanks~ https://github.com/llvm/llvm-project/pull/105610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Stop installing the mach-o module map (PR #105616)

2024-08-21 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/105616 libunwind shouldn't know that compact_unwind_encoding.h is part of a MachO module that it doesn't own. Delete the mach-o module map, and let whatever is in charge of the mach-o directory be the one to

[clang] [clang-format] Correctly compute SplitPenalty of TrailingReturnArrow (PR #105613)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #105480. --- Full diff: https://github.com/llvm/llvm-project/pull/105613.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+2-2) - (modified) clang/unittests/Format/TokenAnn

[clang] [clang-format] Correctly compute SplitPenalty of TrailingReturnArrow (PR #105613)

2024-08-21 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/105613 Fixes #105480. >From 4bb6856deb83b89a5530efca2155da40663753e1 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Wed, 21 Aug 2024 21:45:12 -0700 Subject: [PATCH] [clang-format] Correctly compute SplitPenalty of Trai

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-21 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/6] Changes from old gpuprof branch --- clan

[clang] [RISCV][FMV] Support target_clones (PR #85786)

2024-08-21 Thread Piyou Chen via cfe-commits
@@ -2854,10 +2854,121 @@ void CodeGenFunction::EmitMultiVersionResolver( case llvm::Triple::aarch64: EmitAArch64MultiVersionResolver(Resolver, Options); return; + case llvm::Triple::riscv32: + case llvm::Triple::riscv64: +EmitRISCVMultiVersionResolver(Resolver,

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-21 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/104664 >From 205ed1497a145664471055b24ea0391f93b30711 Mon Sep 17 00:00:00 2001 From: ergawy Date: Sat, 17 Aug 2024 00:20:11 -0500 Subject: [PATCH] [flang][driver] Add pre-processing type to `.i` files This diff allows

[clang] [clang][bytecode] Fix 'if consteval' in non-constant contexts (PR #104707)

2024-08-21 Thread Timm Baeder via cfe-commits
@@ -4368,8 +4363,19 @@ template bool Compiler::visitIfStmt(const IfStmt *IS) { if (!visitDeclStmt(CondDecl)) return false; - if (!this->visitBool(IS->getCond())) -return false; + // Compile condition. + if (IS->isNonNegatedConsteval()) { +if (!this->emit

[clang] [flang] [flang][driver] Add pre-processing type to `.i` (pre-processed) files (PR #104664)

2024-08-21 Thread Kareem Ergawy via cfe-commits
ergawy wrote: > Please bear with me, it's been a while since I've touched this and also, I am > afk 😅 No worries. I am new to this part of the code and might be misinterpreting things myself. > IIRC, the generated temp files (e.g. *.i) are used for the subsequent > compilation phases. So, af

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Remove Move Constructor of MMI + Make MMI Only Use and Externally-Created MCContext (PR #105541)

2024-08-21 Thread Matin Raayai via cfe-commits
https://github.com/matinraayai ready_for_review https://github.com/llvm/llvm-project/pull/105541 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (PR #105610)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: None (h-vetinari) Changes This landed as https://github.com/llvm/llvm-project/pull/102287 for main & https://github.com/llvm/llvm-project/pull/102561 for 19.x CC @ChuanqiXu9 --- Full diff: https://github.com/llvm/llvm-project/pu

[clang] [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (PR #105610)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (h-vetinari) Changes This landed as https://github.com/llvm/llvm-project/pull/102287 for main & https://github.com/llvm/llvm-project/pull/102561 for 19.x CC @ChuanqiXu9 --- Full diff: https://github.com/llvm/llvm-project/pull/10561

[clang] [clang][NFC] remove resolved issue from StandardCPlusPlusModules.rst (PR #105610)

2024-08-21 Thread via cfe-commits
https://github.com/h-vetinari created https://github.com/llvm/llvm-project/pull/105610 This landed as https://github.com/llvm/llvm-project/pull/102287 for main & https://github.com/llvm/llvm-project/pull/102561 for 19.x CC @ChuanqiXu9 >From 866b4834ec847c8459defd1b63b5d227d03e2761 Mon Sep 17

[clang] [Clang][AArch64] Fix typo with colon-separated syntax for system registers (PR #105608)

2024-08-21 Thread via cfe-commits
https://github.com/v01dXYZ edited https://github.com/llvm/llvm-project/pull/105608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-21 Thread Ethan Luis McDonough via cfe-commits
https://github.com/EthanLuisMcDonough updated https://github.com/llvm/llvm-project/pull/102691 >From 24b1a99a1c014e1015fbba137430c5c6f3e414c5 Mon Sep 17 00:00:00 2001 From: Ethan Luis McDonough Date: Fri, 28 Jun 2024 12:39:19 -0500 Subject: [PATCH 1/6] Changes from old gpuprof branch --- clan

[clang] [Sparc] Add flags to enable errata workaround pass for GR712RC and UT700 (PR #104742)

2024-08-21 Thread via cfe-commits
koachan wrote: > We have also developed some performance related patches for the Sparc > backend, but it has been difficult to get them upstreamed as, as you say, few > people are working on the Sparc backend. This is off-topic but is it possible for you to submit it (or if I can see those)?

[clang] [Clang][AArch64] Fix typo with colon-separated syntax for system registers (PR #105608)

2024-08-21 Thread via cfe-commits
https://github.com/v01dXYZ updated https://github.com/llvm/llvm-project/pull/105608 >From faef073dab6d45f1b50fc877e5cf336a3427ecfa Mon Sep 17 00:00:00 2001 From: v01dxyz Date: Thu, 22 Aug 2024 03:55:27 +0200 Subject: [PATCH] [Clang][AArch64] Fix typo with colon-separated syntax for system regi

[clang] [Clang][AArch64] Fix typo with colon-separated syntax for system registers (PR #105608)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 @llvm/pr-subscribers-backend-arm Author: None (v01dXYZ) Changes The range for Op0 was set to 1 instead of 3. The description of e493f17784a9c6000ca7c92499233490f1d1 visually explains the encoding of implementation-defined system reg

[clang] [Clang][AArch64] Fix typo with colon-separated syntax for system registers (PR #105608)

2024-08-21 Thread via cfe-commits
https://github.com/v01dXYZ created https://github.com/llvm/llvm-project/pull/105608 The range for Op0 was set to 1 instead of 3. The description of e493f17784a9c6000ca7c92499233490f1d1 visually explains the encoding of implementation-defined system registers. Gobolt: https://godbolt.org/z

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-08-21 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-08-21 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-08-21 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,53 @@ +//===- DirectX.cpp-===// +// +// 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: Apa

[clang] [llvm] [RISCV] Add CSRs and an instruction for Smctr and Ssctr extensions. (PR #105148)

2024-08-21 Thread Craig Topper via cfe-commits
https://github.com/topperc closed https://github.com/llvm/llvm-project/pull/105148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0ca77f6 - [RISCV] Add CSRs and an instruction for Smctr and Ssctr extensions. (#105148)

2024-08-21 Thread via cfe-commits
Author: Craig Topper Date: 2024-08-21T19:23:07-07:00 New Revision: 0ca77f6656a772624a591261957f6b313a0d544e URL: https://github.com/llvm/llvm-project/commit/0ca77f6656a772624a591261957f6b313a0d544e DIFF: https://github.com/llvm/llvm-project/commit/0ca77f6656a772624a591261957f6b313a0d544e.diff

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-21 Thread Owen Pan via cfe-commits
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && + const auto *Prev = BeforeLeft->Previous; + return Left

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-21 Thread Owen Pan via cfe-commits
@@ -4591,7 +4589,9 @@ bool TokenAnnotator::spaceRequiredBetween(const AnnotatedLine &Line, if (!BeforeLeft) return false; if (BeforeLeft->is(tok::coloncolon)) { - return Left.is(tok::star) && + const auto *Prev = BeforeLeft->Previous; + return Left

[clang] [clang-format] Don't insert a space between :: and * (PR #105043)

2024-08-21 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/105043 >From 4aa47d190a84ecd0432dc9b6db1d38b296f4df23 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 20 Aug 2024 06:44:41 -0700 Subject: [PATCH 1/2] [clang-format] Don't insert a space between :: and * Also, don't

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-21 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,131 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// TODO: Implement "Buffer", we use a substitute UDT +// to test the 't' binding type for this test. + +template +struct [[hlsl::resource_class(SRV)]] MyTemplated

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-21 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. https://github.com/llvm/llvm-project/pull/97103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-21 Thread Damyan Pepper via cfe-commits
@@ -459,7 +467,408 @@ void SemaHLSL::handleResourceClassAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(HLSLResourceClassAttr::Create(getASTContext(), RC, ArgLoc)); } -void SemaHLSL::handleResourceBindingAttr(Decl *D, const ParsedAttr &AL) { +struct RegisterBindingFlags {

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-21 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,71 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + +// This test validates the diagnostics that are emitted when a variable with a "resource" type +// is bound to a register using the register annotation + +/* +tem

[clang] Implement resource binding type prefix mismatch diagnostic infrastructure (PR #97103)

2024-08-21 Thread Damyan Pepper via cfe-commits
@@ -31,6 +31,7 @@ class SemaHLSL : public SemaBase { public: SemaHLSL(Sema &S); + HLSLResourceAttr *mergeHLSLResourceAttr(bool CBuffer); damyanp wrote: I don't think `mergeHLSLResourceAttr` exists any more? https://github.com/llvm/llvm-project/pull/97103

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-08-21 Thread Giuliano Belinassi via cfe-commits
https://github.com/giulianobelinassi updated https://github.com/llvm/llvm-project/pull/105591 >From 3a1a241f925e7b6dcc6c8701ab83b5fb04f18853 Mon Sep 17 00:00:00 2001 From: Giuliano Belinassi Date: Wed, 21 Aug 2024 18:31:36 -0300 Subject: [PATCH] Fix the behavior of __COUNT__ macros when PCH is

[clang] [llvm] [BPF] introduce __attribute__((bpf_fastcall)) (PR #105417)

2024-08-21 Thread via cfe-commits
https://github.com/eddyz87 closed https://github.com/llvm/llvm-project/pull/105417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 64e4643 - [BPF] introduce __attribute__((bpf_fastcall)) (#105417)

2024-08-21 Thread via cfe-commits
Author: eddyz87 Date: 2024-08-22T03:40:56+03:00 New Revision: 64e464349bfca0d90e07f6db2f710d4d53cdacd4 URL: https://github.com/llvm/llvm-project/commit/64e464349bfca0d90e07f6db2f710d4d53cdacd4 DIFF: https://github.com/llvm/llvm-project/commit/64e464349bfca0d90e07f6db2f710d4d53cdacd4.diff LOG:

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-21 Thread Brendan Dahl via cfe-commits
https://github.com/brendandahl updated https://github.com/llvm/llvm-project/pull/105434 >From e992578b7269c365e619fe201e7cc703149c7067 Mon Sep 17 00:00:00 2001 From: Brendan Dahl Date: Tue, 20 Aug 2024 21:55:47 + Subject: [PATCH] [WebAssembly] Change half-precision feature name to fp16. Th

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-21 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. https://github.com/llvm/llvm-project/pull/105434 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Create Texture Dimension attribute in HLSL (PR #104239)

2024-08-21 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/104239 >From aaa455933d3703b84634703fd4fcb5c815aa139e Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 14 Aug 2024 14:02:22 -0700 Subject: [PATCH 1/4] create texture dimension attr --- clang/include/clang/Ba

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-21 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/105597 >From 4118b7dde9adbee7b6aaf5d094d34cb6b64f6c77 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Wed, 21 Aug 2024 16:33:42 -0700 Subject: [PATCH] clang-format: Add "AllowShortNamespacesOnASingleLine" option T

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-21 Thread Galen Elias via cfe-commits
https://github.com/galenelias updated https://github.com/llvm/llvm-project/pull/105597 >From 3819c15c8c6258d1d29a38fcfb71db8567fb34e5 Mon Sep 17 00:00:00 2001 From: Galen Elias Date: Wed, 21 Aug 2024 15:46:35 -0700 Subject: [PATCH] clang-format: Add "AllowShortNamespacesOnASingleLine" option T

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-21 Thread via cfe-commits
Sirraide wrote: > CWG looked at 2917 last week, and changed the status of the issue. Can you > revisit your test for it? Ah, something that was previously accepted is now disallowed; I’ll implement that tomorrow. https://github.com/llvm/llvm-project/pull/101448 ___

[clang] [Clang] Implement C++26’s P2893R3 ‘Variadic friends’ (PR #101448)

2024-08-21 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: @Sirraide CWG looked at 2917 last week, and changed the status of the issue. Can you revisit your test for it? https://cplusplus.github.io/CWG/issues/2917.html https://github.com/llvm/llvm-project/pull/101448 ___ cfe-commits mailing li

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Galen Elias (galenelias) Changes This addresses: https://github.com/llvm/llvm-project/issues/101363 which is a resurrection of a previously opened but never completed review: https://reviews.llvm.org/D11851 The feature is to allow

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-21 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] clang-format: Add "AllowShortNamespacesOnASingleLine" option (PR #105597)

2024-08-21 Thread Galen Elias via cfe-commits
https://github.com/galenelias created https://github.com/llvm/llvm-project/pull/105597 This addresses: https://github.com/llvm/llvm-project/issues/101363 which is a resurrection of a previously opened but never completed review: https://reviews.llvm.org/D11851 The feature is to allow code lik

[clang] [llvm] [NFC][SetTheory] Refactor to use const pointers and range loops (PR #105544)

2024-08-21 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/105544 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Ziqing Luo via cfe-commits
@@ -0,0 +1,101 @@ +// RUN: %clang_cc1 -std=c++20 -Wno-all -Wunsafe-buffer-usage \ +// RUN:-verify %s + +typedef struct {} FILE; +void memcpy(); +void __asan_memcpy(); +void strcpy(); +void strcpy_s(); +void wcscpy_s(); +unsigned strlen( const char* str ); +int fprintf(

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Ziqing Luo via cfe-commits
@@ -0,0 +1,101 @@ +// RUN: %clang_cc1 -std=c++20 -Wno-all -Wunsafe-buffer-usage \ +// RUN:-verify %s + +typedef struct {} FILE; +void memcpy(); +void __asan_memcpy(); +void strcpy(); +void strcpy_s(); +void wcscpy_s(); +unsigned strlen( const char* str ); +int fprintf(

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-08-21 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,54 @@ +//===- DirectX.cpp +//---===// hekota wrote: Oops ;) https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@l

[clang] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-08-21 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/104856 >From 44e814b925a1ad8ac40fe6904542cbade516c065 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Mon, 19 Aug 2024 13:34:13 -0700 Subject: [PATCH 1/3] [DirectX] Add DirectXTargetCodeGenInfo Adds TargetCodeGenInfo

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-08-21 Thread Giuliano Belinassi via cfe-commits
https://github.com/giulianobelinassi updated https://github.com/llvm/llvm-project/pull/105591 >From 914427af9b83848ac395bbff663133aadf387161 Mon Sep 17 00:00:00 2001 From: Giuliano Belinassi Date: Wed, 21 Aug 2024 18:31:36 -0300 Subject: [PATCH] Fix the behavior of __COUNT__ macros when PCH is

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-08-21 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 ab86fc74c04ff508f909b7b6131df1551dd833fc 259653e147aff62c70dd2c16d46886ae2c92412d --e

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-08-21 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Giuliano Belinassi (giulianobelinassi) Changes Previoulsy, calling `ASTUnit::LoadFromCompilerInvocation` with `PrecompilePreambleAfterNParses > 0` caused the `__COUNT__` macro value to be restarted. Thi

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-08-21 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] Fix the behavior of __COUNT__ macros when PCH is enabled (PR #105591)

2024-08-21 Thread Giuliano Belinassi via cfe-commits
https://github.com/giulianobelinassi created https://github.com/llvm/llvm-project/pull/105591 Previoulsy, calling `ASTUnit::LoadFromCompilerInvocation` with `PrecompilePreambleAfterNParses > 0` caused the `__COUNT__` macro value to be restarted. This commit fixes this by remembering the value

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
@@ -443,6 +448,368 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return false; } +namespace libc_fun_disjoint_inner_matchers { +// `libc_fun_disjoint_inner_matchers` covers a set of matchers that match +// disjoint node sets. They all take a `CoreName`, which

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
@@ -0,0 +1,101 @@ +// RUN: %clang_cc1 -std=c++20 -Wno-all -Wunsafe-buffer-usage \ +// RUN:-verify %s + +typedef struct {} FILE; +void memcpy(); +void __asan_memcpy(); +void strcpy(); +void strcpy_s(); +void wcscpy_s(); +unsigned strlen( const char* str ); +int fprintf(

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
@@ -443,6 +449,396 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return false; } +AST_MATCHER_P(CallExpr, hasNumArgs, unsigned, Num) { + return Node.getNumArgs() == Num; +} + +namespace libc_func_matchers { +// Under `libc_func_matchers`, define a set of matche

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: Mostly LGTM! I don't have major concerns. https://github.com/llvm/llvm-project/pull/101583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
@@ -12383,6 +12383,13 @@ def warn_unsafe_buffer_operation : Warning< "%select{unsafe pointer operation|unsafe pointer arithmetic|" "unsafe buffer access|function introduces unsafe buffer manipulation|unsafe invocation of span::data}0">, InGroup, DefaultIgnore; +def warn_

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
@@ -12383,6 +12383,13 @@ def warn_unsafe_buffer_operation : Warning< "%select{unsafe pointer operation|unsafe pointer arithmetic|" "unsafe buffer access|function introduces unsafe buffer manipulation|unsafe invocation of span::data}0">, InGroup, DefaultIgnore; +def warn_

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
@@ -1025,6 +1421,92 @@ class DataInvocationGadget : public WarningGadget { DeclUseList getClaimedVarUseSites() const override { return {}; } }; +class UnsafeLibcFunctionCallGadget : public WarningGadget { + const CallExpr *const Call; + constexpr static const char *const T

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
@@ -443,6 +449,396 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { return false; } +AST_MATCHER_P(CallExpr, hasNumArgs, unsigned, Num) { + return Node.getNumArgs() == Num; +} + +namespace libc_func_matchers { +// Under `libc_func_matchers`, define a set of matche

[clang] [-Wunsafe-buffer-usage] Warning Libc functions (PR #101583)

2024-08-21 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/101583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add CSRs and an instruction for Smctr and Ssctr extensions. (PR #105148)

2024-08-21 Thread Craig Topper via cfe-commits
https://github.com/topperc updated https://github.com/llvm/llvm-project/pull/105148 >From b7a0e87790b1d17201728dba1a9c2149fc7d9a17 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Tue, 20 Aug 2024 10:13:56 -0700 Subject: [PATCH 1/3] [RISCV] Add CSRs and a instruction for Smctr and Ssctr exten

[clang] f709cd5 - Revert "[Coroutines] Salvage the debug information for coroutine frames within optimizations"

2024-08-21 Thread Dmitri Gribenko via cfe-commits
Author: Dmitri Gribenko Date: 2024-08-21T23:49:45+02:00 New Revision: f709cd5add0ea36bb14259e9716bd74e5c762128 URL: https://github.com/llvm/llvm-project/commit/f709cd5add0ea36bb14259e9716bd74e5c762128 DIFF: https://github.com/llvm/llvm-project/commit/f709cd5add0ea36bb14259e9716bd74e5c762128.dif

[clang] [clang] Emit nuw GEPs for array subscript expressions (PR #103088)

2024-08-21 Thread Hari Limaye via cfe-commits
hazzlim wrote: > > adding nuw is also valid for signed indices here > > I don't understand how you think this would work; a-1 and a+-1 are required > to produce the same result. The thinking here RE signed indices was that in this special case, where the base address of the GEP is the start o

[clang] [clang] Add nuw attribute to GEPs (PR #105496)

2024-08-21 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM; the approach here seems appropriate. (The EmitCheckedInBoundsGEP API could probably use a refactor so we don't have calls to isSignedOverflowDefined() scattered all over the place, but that's a separate issue.) https://github.

[clang] [Clang] Add __builtin_is_within_lifetime to implement P2641R4's std::is_within_lifetime (PR #91895)

2024-08-21 Thread via cfe-commits
cor3ntin wrote: @ldionne and @philnik777 you have an opinion on that builtin? https://github.com/llvm/llvm-project/pull/91895 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [XRay] Add support for instrumentation of DSOs on x86_64 (PR #90959)

2024-08-21 Thread Fangrui Song via cfe-commits
@@ -2887,6 +2887,10 @@ def fxray_selected_function_group : HelpText<"When using -fxray-function-groups, select which group of functions to instrument. Valid range is 0 to fxray-function-groups - 1">, MarshallingInfoInt, "0">; +def fxray_enable_shared : Flag<["-"], "fxray-

  1   2   3   4   >