[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From c7ef00e6b9b2c798ef002696be6ebe65195d2fab Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH] [clang] check deduction consistency when partial ordering fu

[clang] [clang-tools-extra] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From 04cbc865505824fec9eae463ab2172bc6fa64b24 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH] [clang] check deduction consistency when partial ordering fu

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-07-25 Thread Kim Gräsman via cfe-commits
kimgr wrote: @etcwilde > The path is already available through the exported clang-resource-header > imported interface target I think that one has the full path to the compiler-supplied built-in headers, not the resource dir (which is basically its parent). We could do some path mangling, bu

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread Craig Topper via cfe-commits
@@ -91,6 +91,116 @@ define i32 @exthz(i16 %a) { ret i32 %1 } +declare i32 @llvm.riscv.cv.alu.slet(i32, i32) + +define i32 @test.cv.alu.slet(i32 %a, i32 %b) { +; CHECK-LABEL: test.cv.alu.slet: +; CHECK: # %bb.0: +; CHECK-NEXT:cv.slet a0, a0, a1 +; CHECK-NEXT:ret

[clang] clang: Allow targets to set custom metadata on atomics (PR #96906)

2024-07-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/96906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e108853 - clang: Allow targets to set custom metadata on atomics (#96906)

2024-07-25 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-07-26T09:57:28+04:00 New Revision: e108853ac8fad27ff22be9303c87d90bcdf0ef53 URL: https://github.com/llvm/llvm-project/commit/e108853ac8fad27ff22be9303c87d90bcdf0ef53 DIFF: https://github.com/llvm/llvm-project/commit/e108853ac8fad27ff22be9303c87d90bcdf0ef53.diff

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm requested changes to this pull request. We should be removing the source level convergent attribute, not adding more uses of it. It was a mistake to define it in the positive direction, and it is completely unusable for end users. Every piece of code that transitively

[clang] [Clang] Initializer list on RHS of assignment (PR #100548)

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

[clang] [Clang] Use private address space for builtin_alloca return type for OpenCL (PR #95750)

2024-07-25 Thread Vikash Gupta via cfe-commits
https://github.com/vg0204 updated https://github.com/llvm/llvm-project/pull/95750 >From c9652ae9092e2d42268cd7f843d921c16410bfc9 Mon Sep 17 00:00:00 2001 From: vg0204 Date: Mon, 17 Jun 2024 11:20:02 +0530 Subject: [PATCH 1/9] [Clang] [WIP] Added builtin_alloca support for OpenCL1.2 and below

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread Craig Topper via cfe-commits
@@ -21901,6 +21901,30 @@ Value *CodeGenFunction::EmitHexagonBuiltinExpr(unsigned BuiltinID, return nullptr; } +static Value *EmitXCVIntrinsic(CodeGenFunction &CGF, unsigned BuiltinID, + unsigned IntrinsicID, + Muta

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread Craig Topper via cfe-commits
@@ -55,6 +55,7 @@ module Clang_Basic { textual header "clang/Basic/BuiltinsNEON.def" textual header "clang/Basic/BuiltinsNVPTX.def" textual header "clang/Basic/BuiltinsPPC.def" + textual header "Basic/BuiltinsRISCVXCV.def" topperc wrote: Missing `clang/

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread Craig Topper via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; + def int_riscv_cv_alu_sletu : ScalarCo

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread Craig Topper via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; topperc wrote: Why do

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread Craig Topper via cfe-commits
@@ -59,16 +59,26 @@ let TargetPrefix = "riscv" in { [IntrNoMem, IntrWillReturn, IntrSpeculatable, ImmArg>, ImmArg>]>; + def int_riscv_cv_alu_slet : ScalarCoreVAluGprGprIntrinsic; + def int_riscv_cv_alu_sletu : ScalarCo

[clang] [clang-cl] [Sema] Support MSVC non-const lvalue to user-defined temporary reference (PR #99833)

2024-07-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: I would like @AaronBallman to review this before committing. https://github.com/llvm/llvm-project/pull/99833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/100692 >From 497d0c668a7303ac45d4d589221976c23c476f3f Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul 2024 03:59:41 -0300 Subject: [PATCH] [clang] check deduction consistency when partial ordering fu

[clang] Fix #99858 (PR #99859)

2024-07-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for submitting a potential fix. First of all this needs a reproducer, one to verify the existing issue and two because we need to add a test to insure we fix and three we need the rest to make sure we don't regress the fix in later releases. The

[clang] [Clang] Initializer list on RHS of assignment (PR #100548)

2024-07-25 Thread Mital Ashok via cfe-commits
@@ -14578,21 +14578,51 @@ ExprResult Sema::CreateBuiltinBinOp(SourceLocation OpLoc, BinaryOperatorKind Opc, Expr *LHSExpr, Expr *RHSExpr) { if (getLangOpts().CPlusPlus11 && isa(RHSExpr)) { -// The sy

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/100692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This makes partial ordering of function templates consistent with other entities. Fixes #18291 --- Patch is 43.09 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-07-25 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/100692 This makes partial ordering of function templates consistent with other entities. Fixes #18291 >From 90d77efa0a4ffacdb7ba5ad4403d77822742a255 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Wed, 24 Jul

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread via cfe-commits
https://github.com/realqhc updated https://github.com/llvm/llvm-project/pull/100684 >From d2169cacc2851db4d57865e26781b93d814ebe80 Mon Sep 17 00:00:00 2001 From: Qihan Cai Date: Fri, 26 Jul 2024 12:26:16 +1000 Subject: [PATCH] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread via cfe-commits
https://github.com/realqhc reopened https://github.com/llvm/llvm-project/pull/100684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2551,6 +3807,9 @@ void clang::sema::AnalysisBasedWarnings::IssueWarnings( SourceLocation())) { CallableVisitor(CallAnalyzers).TraverseTranslationUnitDecl(TU); } + + if (S.Context.hasAnyFunctionEffects()) Sirraide wrote: This d

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -873,30 +873,17 @@ class Sema final : public SemaBase { /// Warn when implicitly casting 0 to nullptr. void diagnoseZeroToNullptrConversion(CastKind Kind, const Expr *E); - // - function effects --- + /// All functions/lambdas/blocks which have bodies and which ha

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = Sirraide wrote: This pr adds 1250 LOC to this file. Imo, this is

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -10897,6 +10902,53 @@ Attr *Sema::getImplicitCodeSegOrSectionAttrForFunction(const FunctionDecl *FD, return nullptr; } +// Should only be called when getFunctionEffects() returns a non-empty set. +// Decl should be a FunctionDecl or BlockDecl. +void Sema::maybeAddDeclWit

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
https://github.com/Sirraide commented: Just a few things I’ve noticed so far. I definitely need to take a closer look at all of this, because it is a lot of code, but before I do that, I have a few questions/remarks about the overall design of this: 1. I think there already is a comment about

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread via cfe-commits
https://github.com/Sirraide edited https://github.com/llvm/llvm-project/pull/99656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread via cfe-commits
https://github.com/realqhc closed https://github.com/llvm/llvm-project/pull/100684 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (PR #99691)

2024-07-25 Thread Phoebe Wang via cfe-commits
phoebewang wrote: I'm good with adding the macro. But how it propagates to other compilers would be an chicken or the egg problem. User won't use this flag if they care the portability, while other compilers may be reluctant to add it if no requiest from their user. https://github.com/llvm/ll

[clang] [Clang][NFC] Remove unnecessary copy (PR #100688)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes Reported by Static Analyzer Tool: In Sema::checkIncorrectVTablePointerAuthenticationAttribute(): Using the auto keyword without an & causes the copy of an object of type CXXBaseSpecifier. --- Full diff: https://gi

[clang] [Clang][NFC] Remove unnecessary copy (PR #100688)

2024-07-25 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/100688 Reported by Static Analyzer Tool: In Sema::checkIncorrectVTablePointerAuthenticationAttribute(): Using the auto keyword without an & causes the copy of an object of type CXXBaseSpecifier. >From a335fcf97c94a3

[clang] [clang] Support -Wa, options -mmsa and -mno-msa (PR #99615)

2024-07-25 Thread via cfe-commits
https://github.com/yingopq updated https://github.com/llvm/llvm-project/pull/99615 >From 1bdf55ea96e212febc7e51720bfbf52a3bdc677c Mon Sep 17 00:00:00 2001 From: Ying Huang Date: Fri, 19 Jul 2024 04:19:09 -0400 Subject: [PATCH] [clang] Support -Wa, options -mmsa and -mno-msa --- clang/include/

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread via cfe-commits
https://github.com/realqhc updated https://github.com/llvm/llvm-project/pull/100684 >From a989acc4bb84b4224307c7535bcfbf623a88a9be Mon Sep 17 00:00:00 2001 From: Qihan Cai Date: Fri, 26 Jul 2024 12:26:16 +1000 Subject: [PATCH] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 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 ac1a1e5797388598201511d17f05aa088ef4a2e2 5d0eb646fdf2925b9b0063f6f42c9447cd0eb460 --e

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: None (realqhc) Changes This commit adds the Clang Builtins, C API header and relevant tests for XCValu extension. Spec: https://github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributor: @melone

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v Author: None (realqhc) Changes This commit adds the Clang Builtins, C API header and relevant tests for XCValu extension. Spec: https://github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributor: @mel

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

2024-07-25 Thread via cfe-commits
https://github.com/realqhc created https://github.com/llvm/llvm-project/pull/100684 This commit adds the Clang Builtins, C API header and relevant tests for XCValu extension. Spec: https://github.com/openhwgroup/core-v-sw/blob/master/specifications/corev-builtin-spec.md Contributor: @meloned

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/7] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
@@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s darkbuck wrote: Update the test again with '--check-globals=all'. That output is the expected one. https://github.com/llvm/llvm-project/pull/100637

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/6] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [clang][ASTImporter][NFC] add unittests for unnamed EnumDecl (PR #100545)

2024-07-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux` running on `sanitizer-buildbot2` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/2152 Here is the relevant piece of the bu

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
@@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s darkbuck wrote: > Please don't merge an "auto-generated" file that isn't actually autogenerated > by the in-tree version. > > (Is --check-attributes not wha

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-07-25 Thread Evan Wilde via cfe-commits
etcwilde wrote: > That forces us back to the original discussion about exporting > CLANG_RESOURCE_DIR The path is already available through the exported `clang-resource-header` imported interface target. https://github.com/llvm/llvm-project/pull/97197 _

[clang-tools-extra] clang-tidy: readability-redundant-smartptr-get does not remove (#97964) (PR #100177)

2024-07-25 Thread via cfe-commits
@@ -104,6 +104,296 @@ New check aliases Changes in existing checks ^^ +- Improved :doc:`bugprone-assert-side-effect + ` check by detecting side + effect from calling a method with non-const reference parameters. akshaykumars614 wrote:

[clang] [clang][ASTImporter][NFC] add unittests for unnamed EnumDecl (PR #100545)

2024-07-25 Thread Ding Fei via cfe-commits
https://github.com/danix800 closed https://github.com/llvm/llvm-project/pull/100545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 978c40b - [clang][ASTImporter][NFC] add unittests for unnamed EnumDecl (#100545)

2024-07-25 Thread via cfe-commits
Author: Ding Fei Date: 2024-07-26T09:34:56+08:00 New Revision: 978c40b4482c7f87a5d087ade85cee53089146d4 URL: https://github.com/llvm/llvm-project/commit/978c40b4482c7f87a5d087ade85cee53089146d4 DIFF: https://github.com/llvm/llvm-project/commit/978c40b4482c7f87a5d087ade85cee53089146d4.diff LOG:

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes `SDiagsWriter` currently requires clients to call `DiagnosticConsumer::finish()` before it is destroyed if `CompilerInstance::ExecuteAction()` has not been called. The problem with this is that it makes

[clang] [clang] Make serialized diagnostics more reliable (PR #100681)

2024-07-25 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/100681 `SDiagsWriter` currently requires clients to call `DiagnosticConsumer::finish()` before it is destroyed if `CompilerInstance::ExecuteAction()` has not been called. The problem with this is that it makes it mu

[clang] [clang] replaced the usage of `asctime` with `std::put_time` (PR #99075)

2024-07-25 Thread Yi-Chi Lee via cfe-commits
yichi170 wrote: Thanks for identifying the problem. @AaronBallman @rorth https://github.com/llvm/llvm-project/pull/99075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-25 Thread Doug Wyatt via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -fsyntax-only -fblocks -fcxx-exceptions -verify %s + +#pragma clang diagnostic ignored "-Wperf-constraint-implies-noexcept" + +// Objective-C +@interface OCClass +- (void)method; +@end + +void nl14(OCClass *oc) [[clang::nonblocking]] { +

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-07-25 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I agree you want to look through some casts... but I'd like to see a check of `getCastKind()` to ensure the cast you're looking through is a cast you're expecting to see. Skipping over CK_BitCast should be fine; I'm concerned you'll end up skipping over something that act

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s efriedma-quic wrote: Please don't merge an "auto-generated" file that isn't actually autogenerated by the in-tree version. (Is --check-attributes not what y

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-25 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @kees @vitalybuka 3ef8d3c implements `-fsanitize=pattern-exclusion=`. It supports the following values: `all` - turn all supported pattern exclusions ON `none` - turn them all off (has precedence over others, I will add a warning soon if users try to use this with "all" or an

[clang] [Clang] Overflow Idiom Exclusions (PR #100272)

2024-07-25 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 06b702cd38943314b2e6f873e64d70baed6f57f7 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/4] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] Add _MM_FROUND_TO_NEAREST_TIES_EVEN to avx512fintrin.h (PR #99691)

2024-07-25 Thread via cfe-commits
hpkfft wrote: I see that both phoebewang and KanRobert work for Intel, so Intel's LLVM compiler `icx` is sure to get this patch. Intel itself is both a customer and partner of Microsoft, so MSVC ought not be a problem. After all, it is in both Intel's and Microsoft's interest to delight their

[clang] [llvm] [openmp] Check multiple pointers in one call (PR #100671)

2024-07-25 Thread Vidush Singhal via cfe-commits
https://github.com/vidsinghal closed https://github.com/llvm/llvm-project/pull/100671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-07-25 Thread Tom Stellard via cfe-commits
tstellar wrote: I think that the `GetResourcesPath` function is incorrect. There's no reason it should return a wrong value, since the CLANG_RESOURCE_DIR value is always known at compile time. https://github.com/llvm/llvm-project/pull/97197 ___ cfe-

[clang] [HLSL] Default and Relaxed Availability Diagnostics (PR #92704)

2024-07-25 Thread Helena Kotas via cfe-commits
@@ -290,3 +294,296 @@ void SemaHLSL::DiagnoseAttrStageMismatch( << A << HLSLShaderAttr::ConvertShaderTypeToStr(Stage) << (AllowedStages.size() != 1) << join(StageStrings, ", "); } + +namespace { + +/// This class implements HLSL availability diagnostics for default

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
@@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s darkbuck wrote: I hacked `llvm/utils/UpdateTestChecks/common.py` a little bit to generate attribute def checks. I may ask for another review on that hack on

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/6] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-07-25 Thread Bill Wendling via cfe-commits
bwendling wrote: > As a matter of ensuring the behavior is predictable, I don't like > IgnoreParenImpCasts(), and more generally looking through casts without > checking the CastKind; it very easily leads to bugs because some casts have > important semantics. Particularly lvalue-to-rvalue cast

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
@@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s darkbuck wrote: > Consider using update_cc_test_checks.py. > > I'd like to see checks that we emit convergence tokens on targets where > that's the default.

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [clang][Sema] Enable the kprintf format attribute (PR #100669)

2024-07-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Brad Smith (brad0) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/100669.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaChecking.cpp (+4-3) ``diff diff --git a/clang/lib/Sema/SemaChecking.cpp b/clan

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/4] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [clang][Sema] Enable the kprintf format attribute (PR #100669)

2024-07-25 Thread Brad Smith via cfe-commits
https://github.com/brad0 created https://github.com/llvm/llvm-project/pull/100669 None >From 32c5cc29fe96f0fb8fb1d7b219f972bc7be7 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 25 Jul 2024 19:12:08 -0400 Subject: [PATCH] [clang][Sema] Enable the kprintf format attribute --- clang/l

[clang] [clang][Sema] Add support for OpenBSD's syslog format attribute (PR #97366)

2024-07-25 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/97366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e788788 - [clang][Sema] Add support for OpenBSD's syslog format attribute (#97366)

2024-07-25 Thread via cfe-commits
Author: Brad Smith Date: 2024-07-25T18:57:14-04:00 New Revision: e788788c42fcbed5077b13f8bb88a81a832ab6eb URL: https://github.com/llvm/llvm-project/commit/e788788c42fcbed5077b13f8bb88a81a832ab6eb DIFF: https://github.com/llvm/llvm-project/commit/e788788c42fcbed5077b13f8bb88a81a832ab6eb.diff LO

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,99 @@ +// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-unknown-linux-gnu -o - | FileCheck %s efriedma-quic wrote: Consider using update_cc_test_checks.py. I'd like to see checks that we emit convergence tokens on targets where that's the default. h

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [clang] Allow 'convergent' to be a statement attribute (PR #100637)

2024-07-25 Thread via cfe-commits
https://github.com/darkbuck updated https://github.com/llvm/llvm-project/pull/100637 >From d9de73264bf4d555e7e09a2c2687eae72c1fa19e Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Thu, 25 Jul 2024 15:19:15 -0400 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?U

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-07-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: As a matter of ensuring the behavior is predictable, I don't like IgnoreParenImpCasts(), and more generally looking through casts without checking the CastKind; it very easily leads to bugs because some casts have important semantics. Particularly lv

[clang] [llvm] [OpenMPIRBuilder][Clang][NFC] - Combine `emitOffloadingArrays` and `emitOffloadingArraysArgument` in OpenMPIRBuilder (PR #97088)

2024-07-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-aarch64-darwin` running on `doug-worker-5` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/2675 Here is

[clang] [clang][ARM64EC] Add support for hybrid_patchable attribute. (PR #99478)

2024-07-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM (Please cherry-pick to 19; I'd like to have this in 19. And maybe https://github.com/cjacek/llvm-project/commit/4febef20ab27ef4440e9dccf3cc65dd6be1f4d7c, if you wouldn't mind opening a pull request for that.) https://github.co

[clang] [InstallAPI] Fix early return for scanning sub-directories (PR #100636)

2024-07-25 Thread Cyndy Ishida via cfe-commits
https://github.com/cyndyishida closed https://github.com/llvm/llvm-project/pull/100636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 4ed543d - [InstallAPI] Fix early return for scanning sub-directories (#100636)

2024-07-25 Thread via cfe-commits
Author: Cyndy Ishida Date: 2024-07-25T15:26:41-07:00 New Revision: 4ed543d414b6f39fb5302322eecb8abf33c76f89 URL: https://github.com/llvm/llvm-project/commit/4ed543d414b6f39fb5302322eecb8abf33c76f89 DIFF: https://github.com/llvm/llvm-project/commit/4ed543d414b6f39fb5302322eecb8abf33c76f89.diff

[clang] clang: Allow targets to set custom metadata on atomics (PR #96906)

2024-07-25 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/96906 ___ 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-07-25 Thread Eli Friedman via cfe-commits
@@ -532,9 +533,298 @@ bool SystemZTargetCodeGenInfo::isVectorTypeBased(const Type *Ty, return false; } +//===--===// +// z/OS XPLINK ABI Implementation +//===

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-25 Thread Ryan Prichard via cfe-commits
rprichard wrote: > The github UI should show all changes to main? Not sure why a rebase would be > necessary...? Sorry, you're right. (Not sure why I didn't notice that before.) The change looks good to me now. https://github.com/llvm/llvm-project/pull/96171 _

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-25 Thread via cfe-commits
h-vetinari wrote: If you're interested in everything but the first commit, the GH UI can do that too (there's a dropdown in the upper lefthand corner): https://github.com/llvm/llvm-project/pull/96171/files/1df587efeb71fb1929667f008d7e9b251863d9d8..a47554828053c039916b005f15446df14f594e50 https:

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-25 Thread via cfe-commits
h-vetinari wrote: > I rebased the changes so I could review them, > https://github.com/llvm/llvm-project/commit/640d2e631a4bc11e3afa030e30d05288ee954cb5. The github UI should show all changes to main? Not sure why a rebase would be necessary...? > The compiler-rt/cmake/config-ix.cmake file is

[clang] [Clang] Remove `IDNS_Ordinary` flag in `IndirectFieldDecl::IdentifierNamespace` (PR #100525)

2024-07-25 Thread via cfe-commits
https://github.com/Sirraide commented: Looks reasonable, but I’d prefer it if someone more familiar w/ the C standard than me could take another look at this. CC @AaronBallman https://github.com/llvm/llvm-project/pull/100525 ___ cfe-commits mailing l

[clang] [flang] [Flang][Driver] Introduce -fopenmp-targets offloading option (PR #100152)

2024-07-25 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: > One related question I have - does Flang compile for one offload model or can > it mix those (let's say compile sources with mixed OpenACC and OpenMP > pragmas)? If mixing is allowed then it may also make sense to add a way of > setting the target per programming model. But

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
@@ -6848,6 +6848,14 @@ CXXRecordMembersNamed(StringRef Name, Sema &S, QualType Ty) { return Results; } +QualType Sema::getTypeMember(QualType Type, StringRef Name) { + auto Results = CXXRecordMembersNamed(Name, *this, Type); + assert(Results.size() <= 1); + if (Results.e

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
@@ -3058,6 +3058,133 @@ void Sema::NoteAllFoundTemplates(TemplateName Name) { } } +static QualType commonTypeImpl(Sema &S, TemplateName BaseTemplate, + SourceLocation TemplateLoc, + ArrayRef Ts) { + auto lookUpComm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: How much of a performance difference are you measuring with this change? https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [libcxx] [Clang] Add __common_type builtin (PR #99473)

2024-07-25 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/99473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] RFC: [cmake] Export CLANG_RESOURCE_DIR in ClangConfig (PR #97197)

2024-07-25 Thread Tulio Magno Quites Machado Filho via cfe-commits
tuliom wrote: > `clang::Driver` has this method which allows you to specify the starting path > for the clang installation to use for the resource lookup. > > ```c++ > /// Takes the path to a binary that's either in bin/ or lib/ and returns > /// the path to clang's resource directory. > static

[clang] 8dd5742 - Fix aarch64-ptrauth.c to avoid writing to cwd which might not be writeable

2024-07-25 Thread David Blaikie via cfe-commits
Author: David Blaikie Date: 2024-07-25T21:52:14Z New Revision: 8dd574236ccaa0a183278396cfec3068b832651a URL: https://github.com/llvm/llvm-project/commit/8dd574236ccaa0a183278396cfec3068b832651a DIFF: https://github.com/llvm/llvm-project/commit/8dd574236ccaa0a183278396cfec3068b832651a.diff LOG:

  1   2   3   4   >