[clang] [llvm] wip: Move instrumentation passes (PR #92171)

2024-05-15 Thread Arthur Eubanks via cfe-commits
@@ -1028,6 +1029,14 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, Phase != ThinOrFullLTOPhase::ThinLTOPostLink) MPM.addPass(SampleProfileProbePass(TM)); + // Instrument function entry and exit before all inlining. + if (Phase != ThinOr

[clang] 9bbefb7 - [clang] Store FPOptions earlier when parsing function (#92146)

2024-05-15 Thread via cfe-commits
Author: Serge Pavlov Date: 2024-05-15T23:12:57+07:00 New Revision: 9bbefb7f600019c9d7025281132dd160729bfff2 URL: https://github.com/llvm/llvm-project/commit/9bbefb7f600019c9d7025281132dd160729bfff2 DIFF: https://github.com/llvm/llvm-project/commit/9bbefb7f600019c9d7025281132dd160729bfff2.diff

[clang] [clang] Store FPOptions earlier when parsing function (PR #92146)

2024-05-15 Thread Serge Pavlov via cfe-commits
https://github.com/spavloff closed https://github.com/llvm/llvm-project/pull/92146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/91082 >From 7e36c4d9f736b9b2eff29e565d22e01c29744c1e Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 4 May 2024 13:10:21 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/91082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Saiyedul Islam via cfe-commits
https://github.com/saiislam created https://github.com/llvm/llvm-project/pull/92290 Legacy toolchain to handle multiple target architectures specified using `-Xopenmp-target= -march=` was only processing a single architecture. This patch also fixes the use of comma to specify multiple archs for

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Saiyedul Islam (saiislam) Changes Legacy toolchain to handle multiple target architectures specified using `-Xopenmp-target= -march=` was only processing a single architecture. This patch also fixes the use of comma t

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Saiyedul Islam (saiislam) Changes Legacy toolchain to handle multiple target architectures specified using `-Xopenmp-target= -march=` was only processing a single architecture. This patch also fixes the use of comma to specify

[clang] [clang-format] Don't always break before << between string literals (PR #92214)

2024-05-15 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. This is interesting.. I like it in that its a "Leave" ... but part of me would like this choice of default behind an option. As with the previous changes in this area I'm uncomfortable about us changing how it behaves, but would like

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Saiyedul Islam via cfe-commits
saiislam wrote: It will fix tests like: [targetid_multi_image](https://github.com/ROCm/aomp/tree/aomp-dev/test/smoke/targetid_multi_image) https://github.com/llvm/llvm-project/pull/92290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [clang-format][NFC] Move LeftRightQualifierAlignmentFixer::is...() (PR #91930)

2024-05-15 Thread via cfe-commits
https://github.com/mydeveloperday commented: Nice https://github.com/llvm/llvm-project/pull/91930 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 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 9bbefb7f600019c9d7025281132dd160729bfff2 a6611634d03d102a8b69df8ff20d324efd81ae48 --

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-05-15 Thread Azat Khuzhin via cfe-commits
https://github.com/azat created https://github.com/llvm/llvm-project/pull/92291 In case of this is frame of signal handler, the IP should be incremented, because the IP saved in the signal handler points to first non-executed instruction, while FDE/CIE expects IP to be after the first non-execu

[clang] 03c53c6 - [MC] Remove UseAssemblerInfoForParsing

2024-05-15 Thread via cfe-commits
Author: Fangrui Song Date: 2024-05-15T09:18:39-07:00 New Revision: 03c53c69a367008da689f0d2940e2197eb4a955c URL: https://github.com/llvm/llvm-project/commit/03c53c69a367008da689f0d2940e2197eb4a955c DIFF: https://github.com/llvm/llvm-project/commit/03c53c69a367008da689f0d2940e2197eb4a955c.diff

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/91082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Azat Khuzhin (azat) Changes In case of this is frame of signal handler, the IP should be incremented, because the IP saved in the signal handler points to first non-executed instruction, while FDE/CIE expects IP to be after the first

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I don't think we want to support this. `-march` was the wrong option to use in the first place, and upstream LLVM never supported specifying multiple device images with `-march` so there isn't a legacy argument in trunk. However, AOMP did support this and if it's deemed too disr

[clang] [Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer (PR #87933)

2024-05-15 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Can we revert this change while you are investigating if this fix is not trivial? https://github.com/llvm/llvm-project/pull/87933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: It's still used: ``` /work/kparzysz/git/llvm.org/mlir/lib/Target/LLVM/ROCDL/Target.cpp: In member function ‘std::optional > mlir::ROCDL::SerializeGPUModuleBase::assembleIsa(llvm::StringRef)’: /work/kparzysz/git/llvm.org/mlir/lib/Target/LLVM/ROCDL/Target.cpp:302:15: error: ‘clas

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Matt Arsenault via cfe-commits
arsenm wrote: > It's still used: > > ``` > /work/kparzysz/git/llvm.org/mlir/lib/Target/LLVM/ROCDL/Target.cpp: In member > function ‘std::optional > > mlir::ROCDL::SerializeGPUModuleBase::assembleIsa(llvm::StringRef)’: > /work/kparzysz/git/llvm.org/mlir/lib/Target/LLVM/ROCDL/Target.cpp:302:15:

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: > But why? I don't know what business MLIR could possibly have touching this, > for AMDGPU of all things I don't know why, but my build is failing now. https://github.com/llvm/llvm-project/pull/91082 ___ cfe-commits mailing list cfe-c

[clang] [llvm] [AArch64] Support preserve_none calling convention (PR #91046)

2024-05-15 Thread via cfe-commits
https://github.com/weiguozhi commented: Looks good to me. Please wait for AArch64 maintainer's approval. https://github.com/llvm/llvm-project/pull/91046 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-05-15 Thread Eli Friedman via cfe-commits
@@ -3768,6 +3768,12 @@ def err_conflicting_attributes_arm_state : Error< "conflicting attributes for state '%0'">; def err_sme_streaming_cannot_be_multiversioned : Error< "streaming function cannot be multi-versioned">; +def err_sme_streaming_mode_change_no_sve : Error< +

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-05-15 Thread Eli Friedman via cfe-commits
@@ -8287,6 +8289,13 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, SDValue InGlue; if (RequiresSMChange) { + +if (Subtarget->hasSVE()) { efriedma-quic wrote: I'm not sure I follow what the issue is... I think we discussed before that we w

[clang] [llvm] [MC] Remove UseAssemblerInfoForParsing (PR #91082)

2024-05-15 Thread Krzysztof Parzyszek via cfe-commits
kparzysz wrote: Problem solved in 29c2475f215110d9e6b3955d5eb2832b3f719c2f. https://github.com/llvm/llvm-project/pull/91082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Gate unratified profiles behind -menable-experimental-extensions (PR #92167)

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

[clang] be10746 - [clang] Don't assume location of compiler-rt for OpenBSD (#92183)

2024-05-15 Thread via cfe-commits
Author: John Ericson Date: 2024-05-15T12:43:55-04:00 New Revision: be10746f3a4381456eb5082a968766201c17ab5d URL: https://github.com/llvm/llvm-project/commit/be10746f3a4381456eb5082a968766201c17ab5d DIFF: https://github.com/llvm/llvm-project/commit/be10746f3a4381456eb5082a968766201c17ab5d.diff

[clang] [clang] Don't assume location of compiler-rt for OpenBSD (PR #92183)

2024-05-15 Thread John Ericson via cfe-commits
https://github.com/Ericson2314 closed https://github.com/llvm/llvm-project/pull/92183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
JOE1994 wrote: > Do we know why GCC elected to go that route? This seems like something that > should be enabled by default because the false positive rate should be quite > low. It seems like `gcc` doesn't enable `-Wparentheses` by default, while `clang` enables it by default. I will add a

[clang] [llvm] [LV][LAA] Vectorize math lib calls with mem write-only attribute (PR #78432)

2024-05-15 Thread Maciej Gabka via cfe-commits
@@ -2477,6 +2493,15 @@ void LoopAccessInfo::analyzeLoop(AAResults *AA, LoopInfo *LI, // Save 'store' instructions. Abort if other instructions write to memory. if (I.mayWriteToMemory()) { +// We can safety handle math functions that have vectorized +

[clang] [OpenCL] Add cl_khr_kernel_clock builtins (PR #91950)

2024-05-15 Thread Chunyang Dai via cfe-commits
https://github.com/cdai2 commented: LGTM. Compilation is verified. https://github.com/llvm/llvm-project/pull/91950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Don't assume location of compiler-rt for OpenBSD (PR #92183)

2024-05-15 Thread John Ericson via cfe-commits
Ericson2314 wrote: /cherry-pick be10746 https://github.com/llvm/llvm-project/pull/92183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-15 Thread via cfe-commits
https://github.com/SunilKuravinakop updated https://github.com/llvm/llvm-project/pull/92055 >From 6946c9f1285d5a27eafcdbf13f79c0641736198d Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Thu, 9 May 2024 12:09:15 -0500 Subject: [PATCH 1/5] Avoiding DeclRefExpr with "non_odr_use_unevaluate

[clang] [llvm] [clang][SPIR-V] Add support for AMDGCN flavoured SPIRV (PR #89796)

2024-05-15 Thread Eli Friedman via cfe-commits
@@ -6088,6 +6088,9 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, StringRef Prefix = llvm::Triple::getArchTypePrefix(getTarget().getTriple().getArch()); if (!Prefix.empty()) { +if (Prefix == "spv" && +getTarget().getTr

[clang] [clang] Don't assume location of compiler-rt for OpenBSD (PR #92183)

2024-05-15 Thread via cfe-commits
llvmbot wrote: >/cherry-pick be10746 Error: Command failed due to missing milestone. https://github.com/llvm/llvm-project/pull/92183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Don't assume location of compiler-rt for OpenBSD (PR #92183)

2024-05-15 Thread John Ericson via cfe-commits
https://github.com/Ericson2314 milestoned https://github.com/llvm/llvm-project/pull/92183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Don't assume location of compiler-rt for OpenBSD (PR #92183)

2024-05-15 Thread John Ericson via cfe-commits
Ericson2314 wrote: /cherry-pick be10746 https://github.com/llvm/llvm-project/pull/92183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. Realistically, I don't think we can deprecate the extension in general: https://sourcegraph.com/search?q=context:global+%5BA-Za-z0-9_%5D%2B%5Cs%5BA-Za-z0-9_%5D%2B%5C%5B0%5C%5D%3B+-file:.*test.*+-file:.*clang.*+count:10&patternType=re

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/86652 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-15 Thread Aaron Ballman via cfe-commits
@@ -5143,6 +5143,10 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, case UTT_IsFloatingPoint: return T->isFloatingType(); case UTT_IsArray: +// zero-sized arrays aren't considered arrays in partial specializations, +// so __is_array shouldn't c

[clang] [Clang] Fix __is_array returning true for zero-sized arrays (PR #86652)

2024-05-15 Thread Aaron Ballman via cfe-commits
@@ -5143,6 +5143,10 @@ static bool EvaluateUnaryTypeTrait(Sema &Self, TypeTrait UTT, case UTT_IsFloatingPoint: return T->isFloatingType(); case UTT_IsArray: +// zero-sized arrays aren't considered arrays in partial specializations, AaronBallman wro

[clang] [clang] Don't assume location of compiler-rt for OpenBSD (PR #92183)

2024-05-15 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#92293 https://github.com/llvm/llvm-project/pull/92183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Aaron Ballman via cfe-commits
@@ -14878,6 +14878,11 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, case BO_GT: ConvertHalfVec = true; ResultTy = CheckCompareOperands(LHS, RHS, OpLoc, Opc); + +if (const auto *BI = dyn_cast(LHSExpr)) + if (BI->isComparisonOp()) +Diag(

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Aaron Ballman via cfe-commits
@@ -215,3 +215,10 @@ namespace PR20735 { // fix-it:"{{.*}}":{[[@LINE-9]]:20-[[@LINE-9]]:20}:")" } } + +void consecutive_builtin_compare(int x, int y, int z) { + (void)(x < y < z); // expected-warning {{comparisons like 'X<=Y<=Z' don't have their mathematical meaning}}

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/92200 >From 2c7f9a083c129df70a79d019286b6a29643a8973 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 14 May 2024 17:42:59 -0500 Subject: [PATCH 1/2] [clang][Sema] Warn consecutive builtin comparisons in an expr

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 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 c5cd049566a795ba5de88dfbb2eb563cad4a9d8a b3cc457efc40a345d4b67c776edd470e35f73de2 --

[clang] [NFC][amdgpuarch] Correct file names in file header comments (PR #92294)

2024-05-15 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/92294 None >From cbeb6bcbd4442af709823af75ca82a2d33be9482 Mon Sep 17 00:00:00 2001 From: Jacob Lambert Date: Wed, 15 May 2024 10:12:45 -0700 Subject: [PATCH] [NFC][amdgpuarch] Correct file names in file header comments

[clang] [NFC][amdgpuarch] Correct file names in file header comments (PR #92294)

2024-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jacob Lambert (lamb-j) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/92294.diff 2 Files Affected: - (modified) clang/tools/amdgpu-arch/AMDGPUArchByHIP.cpp (+1-1) - (modified) clang/tools/amdgpu-arch/AMDGPUArchByHSA.

[clang] [NFC][amdgpuarch] Correct file names in file header comments (PR #92294)

2024-05-15 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/92294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/92295 This patch allows attributes to be attached to C++20 concepts, implementing [CWG2428](https://cplusplus.github.io/CWG/issues/2428.html). >From a0d5a234431f3db2f0283ffa0909bf8c254aa611 Mon Sep 17 00:00:00 2001 Fr

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch allows attributes to be attached to C++20 concepts, implementing [CWG2428](https://cplusplus.github.io/CWG/issues/2428.html). --- Full diff: https://github.com/llvm/llvm-project/pull/92295.d

[clang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [openmp] [polly] fix(python): fix comparison to None (PR #91857)

2024-05-15 Thread Teresa Johnson via cfe-commits
https://github.com/teresajohnson approved this pull request. compiler-rt changes lgtm https://github.com/llvm/llvm-project/pull/91857 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/92295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Please be sure to add a release note about implementing the DR. https://github.com/llvm/llvm-project/pull/92295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Aaron Ballman via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html";>1815 CD4 Lifetime extension in aggregate initialization -Clang 19 +Yes AaronBallman wrote: Unrelated changes snuck in. http

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Aaron Ballman via cfe-commits
@@ -45,6 +45,34 @@ void fallthrough(int n) { #endif } +namespace cwg2428 { // cwg2428: 19 +#if __cplusplus >= 202002L +template +concept C [[deprecated]] = true; // #C AaronBallman wrote: I'd like an additional test for rejecting: ``` template [[deprecated]

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html";>1815 CD4 Lifetime extension in aggregate initialization -Clang 19 +Yes Endilll wrote: This particular one is an unfortunate

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll edited https://github.com/llvm/llvm-project/pull/92295 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Fix some assertions not looking through type sugar (PR #92299)

2024-05-15 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/92299 Fixes #92284 >From 98d773a3a0a2faa407fddb20a63db7bf01890a98 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Wed, 15 May 2024 18:50:14 +0100 Subject: [PATCH] [Clang] [Sema] Fix some assertions not looking thr

[clang] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs in C (PR #90786)

2024-05-15 Thread Dan Liew via cfe-commits
https://github.com/delcypher updated https://github.com/llvm/llvm-project/pull/90786 >From e6fb7a3374ada3d02b4c89263ffd14a037a7e56a Mon Sep 17 00:00:00 2001 From: Dan Liew Date: Wed, 1 May 2024 13:56:52 -0700 Subject: [PATCH] [BoundsSafety] Allow 'counted_by' attribute on pointers in structs i

[clang] [Clang] [Sema] Fix some assertions not looking through type sugar (PR #92299)

2024-05-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes Fixes #92284 --- Full diff: https://github.com/llvm/llvm-project/pull/92299.diff 3 Files Affected: - (modified) clang/lib/AST/ExprConstant.cpp (+1-1) - (modified) clang/lib/Sema/SemaInit.cpp (+1-1) - (

[clang] [Clang] Fix some assertions not looking through type sugar (PR #92299)

2024-05-15 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/92299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [Sema] Fix some assertions not looking through type sugar (PR #92299)

2024-05-15 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/92299 >From b6cb1c53a20637255bf869617b60155bfb636c60 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Wed, 15 May 2024 18:50:14 +0100 Subject: [PATCH] [Clang] Fix some assertions not looking through type sugar Fixe

[clang] [Clang] Emit lifetime markers for non-aggregate temporary allocas (PR #90849)

2024-05-15 Thread Eli Friedman via cfe-commits
@@ -1,13 +1,15 @@ -// RUN: %clang_cc1 -emit-llvm -triple arm64-- -o - %s -O0 | FileCheck %s --check-prefix=CHECK-O0 -// RUN: %clang_cc1 -emit-llvm -disable-llvm-optzns -triple arm64-- -o - %s -O3 | FileCheck %s --check-prefix=CHECK-O3 +// NOTE: Assertions have been autogenerated

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Saiyedul Islam via cfe-commits
saiislam wrote: > I don't think we want to support this. `-march` was the wrong option to use > in the first place, and upstream LLVM never supported specifying multiple > device images with `-march` so there isn't a legacy argument in trunk. > However, AOMP did support this and if it's deemed

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > I don't think we want to support this. `-march` was the wrong option to use > > in the first place, and upstream LLVM never supported specifying multiple > > device images with `-march` so there isn't a legacy argument in trunk. > > However, AOMP did support this and if it's

[clang] [Clang] Fix some assertions not looking through type sugar (PR #92299)

2024-05-15 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. LGTM, Thanks! https://github.com/llvm/llvm-project/pull/92299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 updated https://github.com/llvm/llvm-project/pull/92200 >From 2c7f9a083c129df70a79d019286b6a29643a8973 Mon Sep 17 00:00:00 2001 From: Youngsuk Kim Date: Tue, 14 May 2024 17:42:59 -0500 Subject: [PATCH 1/3] [clang][Sema] Warn consecutive builtin comparisons in an expr

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Warn consecutive builtin comparisons in an expression (PR #92200)

2024-05-15 Thread Youngsuk Kim via cfe-commits
https://github.com/JOE1994 edited https://github.com/llvm/llvm-project/pull/92200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Saiyedul Islam via cfe-commits
saiislam wrote: > > > I don't think we want to support this. `-march` was the wrong option to > > > use in the first place, and upstream LLVM never supported specifying > > > multiple device images with `-march` so there isn't a legacy argument in > > > trunk. However, AOMP did support this an

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > If `-march` is the wrong option then let's start deprecating it and remove it > altogether in the next llvm release. But, as long as it is here, it should be > equivalent to `--offload-arch`. Honestly not a bad idea. I could make a patch warning users to use `--offload-arch`

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From 6428b9603044031aa5c58b2d75a0e9310bc3af6a Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 1/4] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK calling

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Fanbo Meng via cfe-commits
@@ -529,9 +530,401 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Saiyedul Islam via cfe-commits
saiislam wrote: > > If `-march` is the wrong option then let's start deprecating it and remove > > it altogether in the next llvm release. But, as long as it is here, it > > should be equivalent to `--offload-arch`. > > Honestly not a bad idea. I could make a patch warning users to use > `--o

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > > If `-march` is the wrong option then let's start deprecating it and > > > remove it altogether in the next llvm release. But, as long as it is > > > here, it should be equivalent to `--offload-arch`. > > > > > > Honestly not a bad idea. I could make a patch warning users

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-15 Thread via cfe-commits
@@ -290,13 +295,13 @@ widenKeyToValueMap(const llvm::MapVector &CurMap, namespace { // Visitor that builds a map from record prvalues to result objects. -// This traverses the body of the function to be analyzed; for each result -// object that it encounters, it propagates th

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,86 @@ +//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++ -*-===// +// +// 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] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks approved this pull request. thanks, I think abstracting out GEPNoWrapFlags is good https://github.com/llvm/llvm-project/pull/90824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [IR] Add getelementptr nusw and nuw flags (PR #90824)

2024-05-15 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,86 @@ +//===-- llvm/GEPNoWrapFlags.h - NoWrap flags for GEPs ---*- C++ -*-===// +// +// 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] [clang] Enable C++17 relaxed template template argument matching by default (PR #89807)

2024-05-15 Thread via cfe-commits
joanahalili wrote: Hello @ mizvekov We are seeing a widespread breakage due to this commit and could use having the flag `-fno-relaxed-template-template-args` un-deprecated for a while. This would help do a cleanup on our end. https://github.com/llvm/llvm-project/pull/89807 _

[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

2024-05-15 Thread Shilei Tian via cfe-commits
shiltian wrote: > > > > If `-march` is the wrong option then let's start deprecating it and > > > > remove it altogether in the next llvm release. But, as long as it is > > > > here, it should be equivalent to `--offload-arch`. > > > > > > > > > Honestly not a bad idea. I could make a patch w

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-15 Thread via cfe-commits
@@ -403,4 +405,35 @@ TEST_F(EnvironmentTest, Contains(Member)); } +TEST_F(EnvironmentTest, Stmt) { + using namespace ast_matchers; + + std::string Code = R"cc( + struct S {int i;}; + void foo() { +S AnS = S{1}; + } martin

[clang] [clang] Implement CWG2428 "Deprecating a concept" (PR #92295)

2024-05-15 Thread Aaron Ballman via cfe-commits
@@ -10698,7 +10698,7 @@ C++ defect report implementation status https://cplusplus.github.io/CWG/issues/1815.html";>1815 CD4 Lifetime extension in aggregate initialization -Clang 19 +Yes AaronBallman wrote: It's usually better to apply the

[clang] [NFC][amdgpuarch] Correct file names in file header comments (PR #92294)

2024-05-15 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/92294 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Darwin][IR] Don't error on target_variant mismatch when linking IR (PR #92297)

2024-05-15 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan updated https://github.com/llvm/llvm-project/pull/92297 >From dcdad613db40ce325c1ffbe98df02c454daa3771 Mon Sep 17 00:00:00 2001 From: Steven Wu Date: Wed, 15 May 2024 10:35:55 -0700 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?=

[clang] d542eb7 - [clang] Add tests for CWG issues regarding completeness of types (#92113)

2024-05-15 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-05-15T23:12:02+04:00 New Revision: d542eb7aa830e94490b943a3ea0937506fece15b URL: https://github.com/llvm/llvm-project/commit/d542eb7aa830e94490b943a3ea0937506fece15b DIFF: https://github.com/llvm/llvm-project/commit/d542eb7aa830e94490b943a3ea0937506fece15b.

[clang] [clang] Add tests for CWG issues regarding completeness of types (PR #92113)

2024-05-15 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/92113 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't always break before << between string literals (PR #92214)

2024-05-15 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. I think this is a reasonable compromise. https://github.com/llvm/llvm-project/pull/92214 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-15 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti edited https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] Add ``ignoringParenImpCasts`` in arguments of hasArgument (PR #89553)

2024-05-15 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Somehow I couldn't link that issue the normal way through the `Development` entry on the side, so I eddited in a `Fixed` message into the initial comment. https://github.com/llvm/llvm-project/pull/89553 ___ cfe-commits mailing list cfe

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-15 Thread via cfe-commits
@@ -403,4 +405,35 @@ TEST_F(EnvironmentTest, Contains(Member)); } +TEST_F(EnvironmentTest, Stmt) { + using namespace ast_matchers; + + std::string Code = R"cc( + struct S {int i;}; + void foo() { +S AnS = S{1}; + } martin

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-15 Thread via cfe-commits
@@ -146,6 +146,30 @@ TEST_F(DataflowAnalysisTest, DiagnoseFunctionDiagnoserCalledOnEachElement) { " (Lifetime ends)\n"))); } +TEST_F(DataflowAnalysisTest, CanAnalyzeStmt) { + std::string Code = R"cc( + struct S {int i;}; + S getAn

[clang] [clang][dataflow] Fully support Environment construction for Stmt analysis. (PR #91616)

2024-05-15 Thread via cfe-commits
https://github.com/martinboehme approved this pull request. https://github.com/llvm/llvm-project/pull/91616 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Fanbo Meng via cfe-commits
https://github.com/fanbo-meng updated https://github.com/llvm/llvm-project/pull/91384 >From 6428b9603044031aa5c58b2d75a0e9310bc3af6a Mon Sep 17 00:00:00 2001 From: Fanbo Meng Date: Tue, 7 May 2024 13:36:38 -0400 Subject: [PATCH 1/5] [SystemZ][z/OS] Implement z/OS XPLINK ABI The XPLINK calling

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-05-15 Thread Ziqing Luo via cfe-commits
@@ -1551,6 +1567,58 @@ bool Preprocessor::isPPInSafeBufferOptOutRegion(SourceLocation &StartLoc) { return InSafeBufferOptOutRegion; } +SmallVector +Preprocessor::serializeSafeBufferOptOutMap() const { + assert(!InSafeBufferOptOutRegion && ziqingluo-90 wrot

[clang] [SystemZ][z/OS] Implement z/OS XPLINK ABI (PR #91384)

2024-05-15 Thread Fanbo Meng via cfe-commits
@@ -0,0 +1,137 @@ +// RUN: %clang_cc1 -triple s390x-ibm-zos \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple s390x-ibm-zos -target-feature +vector \ +// RUN: -emit-llvm -no-enable-noundef-analysis -o - %s | FileCheck %s +// R

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-05-15 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: > I'm very happy that this is going somewhere! Everything makes sense to me but > I also don't know a lot about this stuff. > > > During serialization, it only serializes regions of the current translation > > unit. Regions from loaded files are not serialized. > > Hmm how

[clang] [WIP][Safe Buffers] Serialize unsafe_buffer_usage pragmas (PR #92031)

2024-05-15 Thread Dana Jansens via cfe-commits
danakj wrote: I am curious so I will ask: why did this take an approach of serializing the output of the pragmas (the maps) instead of serializing the pragmas themselves as AST nodes, so that the maps would be constructed in the same way as from parsing the text directly? that's how other prag

<    1   2   3   4   5   >