[llvm] [clang] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
@@ -573,6 +573,11 @@ struct EmptyCoverageMappingBuilder : public CoverageMappingBuilder { /// creation. struct MCDCCoverageBuilder { + struct DecisionIDPair { +MCDCConditionID TrueID = 0; +MCDCConditionID FalseID = 0; + }; chapuni wrote:

[llvm] [clang] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
@@ -663,54 +668,40 @@ struct MCDCCoverageBuilder { private: CodeGenModule - llvm::SmallVector AndRHS; - llvm::SmallVector OrRHS; - llvm::SmallVector NestLevel; + llvm::SmallVector DecisionStack; llvm::DenseMap llvm::DenseMap MCDCConditionID NextID = 1;

[llvm] [clang] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
@@ -722,6 +713,9 @@ struct MCDCCoverageBuilder { return I->second; } + /// Return the LHS Decision ([0,0] if not set). + const DecisionIDPair back() const { return DecisionStack.back(); } chapuni wrote: I think this may be byref as far as the

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
@@ -1884,20 +1874,28 @@ struct CounterCoverageMappingBuilder } void VisitBinLOr(const BinaryOperator *E) { -// Keep track of Binary Operator and assign MCDC condition IDs +bool IsRootNode = MCDCBuilder.isIdle(); + +// Keep track of Binary Operator and assign

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
@@ -663,54 +668,40 @@ struct MCDCCoverageBuilder { private: CodeGenModule - llvm::SmallVector AndRHS; - llvm::SmallVector OrRHS; - llvm::SmallVector NestLevel; + llvm::SmallVector DecisionStack; chapuni wrote: I meant; `llvm::SmallVector` w/o the

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
@@ -730,68 +723,70 @@ struct MCDCCoverageBuilder { return; // If binary expression is disqualified, don't do mapping. -if (NestLevel.empty() && -!MCDCBitmapMap.contains(CodeGenFunction::stripCond(E))) +if (!isBuilding() &&

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni commented: Almost good, thanks! Could you mention the issue #77873 in the description or in the subject? https://github.com/llvm/llvm-project/pull/78202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni edited https://github.com/llvm/llvm-project/pull/78202 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread Jie Fu 傅杰 via cfe-commits
DamonFool wrote: > Is there a reason you put this first? Otherwise IMO it is slightly neater to > put it last. This bug had been fixed here: ``` commit 1b60ddd920e0caadfa85cc7013b559d6453d7e3e Author: Jie Fu Date: Thu Jan 18 07:34:09 2024 +0800 [Hurd] Fix -Wswitch in

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread Samuel Thibault via cfe-commits
sthibaul wrote: > Is there a reason you put this first? No particular reason. > Otherwise IMO it is slightly neater to put it last. Done so. https://github.com/llvm/llvm-project/pull/78520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread Samuel Thibault via cfe-commits
https://github.com/sthibaul updated https://github.com/llvm/llvm-project/pull/78520 >From 15e157e3f7a6beb0b8be36ad1a9dbe3d2079eecf Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 18 Jan 2024 00:18:03 +0100 Subject: [PATCH] hurd: Fix build with -Werror,-Wswitch We do not handle all

Re: [clang] d5000e9 - rename to 'try' isntead of 'Try'x

2024-01-17 Thread David Blaikie via cfe-commits
Ah, no worries - thanks for being aware of it & I get we're all having some teething problems with github, etc. On Wed, Jan 17, 2024 at 3:36 PM Erich Keane wrote: > yeah, something weird happened with this one that i haven't figured out > yet. This was a response to a review comment, and was

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. Is there a reason you put this first? Otherwise IMO it is slightly neater to put it last. https://github.com/llvm/llvm-project/pull/78520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread Samuel Thibault via cfe-commits
sthibaul wrote: > Drive-by: is the `llvm_unreachable` actually unreachable? I.e. we never call > this function with this case? Hurd triplets are only defined for x86 and x86_64. https://github.com/llvm/llvm-project/pull/78520 ___ cfe-commits

[llvm] [lldb] [compiler-rt] [clang] [lld] [mlir] [libc] [clang-tools-extra] [flang] [AMDGPU] Reapply 'Sign extend simm16 in setreg intrinsic' (PR #78492)

2024-01-17 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/78492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread Florian Mayer via cfe-commits
fmayer wrote: Drive-by: is the `llvm_unreachable` actually unreachable? I.e. we never call this function with this case? Otherwise we are introducing UB in `NDEBUG` builds ``` /// In NDEBUG builds, if the platform does not support a builtin unreachable /// then we call an internal LLVM runtime

[clang-tools-extra] [flang] [lld] [libc] [clang] [llvm] [mlir] [compiler-rt] [lldb] [AMDGPU] Reapply 'Sign extend simm16 in setreg intrinsic' (PR #78492)

2024-01-17 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec updated https://github.com/llvm/llvm-project/pull/78492 >From 01af6c9d8e80b810bbdec35dee38b1cf5d73cfe0 Mon Sep 17 00:00:00 2001 From: Stanislav Mekhanoshin Date: Fri, 12 Jan 2024 15:07:53 -0800 Subject: [PATCH 1/3] [AMDGPU] Sign extend simm16 in setreg intrinsic We

[compiler-rt] [clang] [llvm] [X86] Support "f16c" and "avx512fp16" for __builtin_cpu_supports (PR #78384)

2024-01-17 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf closed https://github.com/llvm/llvm-project/pull/78384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f3a4de3 - [X86] Support "f16c" and "avx512fp16" for __builtin_cpu_supports (#78384)

2024-01-17 Thread via cfe-commits
Author: Freddy Ye Date: 2024-01-18T09:22:04+08:00 New Revision: f3a4de395c167aeb8207294222c6ff5719ef6f62 URL: https://github.com/llvm/llvm-project/commit/f3a4de395c167aeb8207294222c6ff5719ef6f62 DIFF: https://github.com/llvm/llvm-project/commit/f3a4de395c167aeb8207294222c6ff5719ef6f62.diff

[clang] [llvm] Hurd: Add x86_64 support (PR #78065)

2024-01-17 Thread Samuel Thibault via cfe-commits
sthibaul wrote: See https://github.com/llvm/llvm-project/pull/78520 https://github.com/llvm/llvm-project/pull/78065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Hurd: Add x86_64 support (PR #78065)

2024-01-17 Thread Florian Mayer via cfe-commits
fmayer wrote: This broke Sanitizer bots: ``` [5/25] Building CXX object tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Hurd.cpp.o FAILED: tools/clang/lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/Hurd.cpp.o CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache

[clang-tools-extra] [flang] [clang] [llvm] [compiler-rt] workflows: Refactor release-tasks.yml (PR #69523)

2024-01-17 Thread Tom Stellard via cfe-commits
https://github.com/tstellar closed https://github.com/llvm/llvm-project/pull/69523 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add B extension (PR #76893)

2024-01-17 Thread Kito Cheng via cfe-commits
kito-cheng wrote: It tagged with 0.1 now :) https://github.com/riscv/riscv-b/releases/tag/v0.1 https://github.com/llvm/llvm-project/pull/76893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [llvm] [clang] [AMDGPU] Reapply 'Sign extend simm16 in setreg intrinsic' (PR #78492)

2024-01-17 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/78492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #78526)

2024-01-17 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: We've discussed this before, years ago. Previously, the sticking point was: how is LLVM going to know what the frontend considers the closest surrounding subobject to be? The LLVM type doesn't give you that information, and it seems like there's nowhere

[clang] [compiler-rt] [llvm] [X86] Support "f16c" and "avx512fp16" for __builtin_cpu_supports (PR #78384)

2024-01-17 Thread Freddy Ye via cfe-commits
@@ -80,17 +80,17 @@ OutOfLineDefs::foo(int, int, int) { // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEiii.S // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEiii.R // LINUX: define weak_odr ptr @_ZN13OutOfLineDefs3fooEiii.resolver() -// LINUX: ret

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #78526)

2024-01-17 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 8947469ec1ad6d35b2feec0acc43d0d191514f0b ab13650e232b1a17cf9c7335f90a33f7eb71f741 --

[compiler-rt] [clang] [clang-tools-extra] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-17 Thread Ellis Hoag via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""),

[clang] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #75652)

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

[clang] [llvm] [Clang] Correct __builtin_dynamic_object_size for subobject types (PR #78526)

2024-01-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-globalisel @llvm/pr-subscribers-backend-amdgpu @llvm/pr-subscribers-clang-codegen Author: Bill Wendling (bwendling) Changes The second argument of __builtin_dynamic_object_size controls whether it returns the size of the whole object or the closest

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-17 Thread via cfe-commits
@@ -2256,6 +2256,10 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { Range = UO->getSubExpr()->getSourceRange(); MsgParam = 1; } +} else if (const auto *CtorExpr = dyn_cast(Operation)) { + S.Diag(CtorExpr->getLocation(), +

[clang] [-Wunsafe-buffer-usage] Add a new warning for uses of std::span two-parameter constructors (PR #77148)

2024-01-17 Thread via cfe-commits
@@ -12075,6 +12075,9 @@ def note_unsafe_buffer_variable_fixit_together : Note< "%select{|, and change %2 to safe types to make function %4 bounds-safe}3">; def note_safe_buffer_usage_suggestions_disabled : Note< "pass -fsafe-buffer-usage-suggestions to receive code

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Jessica Clarke via cfe-commits
@@ -722,6 +722,11 @@ def FeatureStdExtSsaia "'Ssaia' (Advanced Interrupt Architecture Supervisor " "Level)", []>; +def FeatureStdExtSmepmp +: SubtargetFeature<"smepmp", "HasStdExtSmepmp", "true", +

[compiler-rt] [clang] [llvm] [X86] Support "f16c" and "avx512fp16" for __builtin_cpu_supports (PR #78384)

2024-01-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/78384 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [compiler-rt] [X86] Support "f16c" and "avx512fp16" for __builtin_cpu_supports (PR #78384)

2024-01-17 Thread Fangrui Song via cfe-commits
@@ -80,17 +80,17 @@ OutOfLineDefs::foo(int, int, int) { // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEiii.S // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEiii.R // LINUX: define weak_odr ptr @_ZN13OutOfLineDefs3fooEiii.resolver() -// LINUX: ret

[llvm] [clang] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread Alan Phipps via cfe-commits
https://github.com/evodius96 updated https://github.com/llvm/llvm-project/pull/78202 >From 8751417f4889a120193a604e2ea91627f3b064e8 Mon Sep 17 00:00:00 2001 From: Alan Phipps Date: Mon, 15 Jan 2024 12:24:36 -0600 Subject: [PATCH 1/4] [clang][CoverageMapping] Refactor when setting MC/DC

[llvm] [clang] [clang][CoverageMapping] Refactor when setting MC/DC True/False (PR #78202)

2024-01-17 Thread Alan Phipps via cfe-commits
@@ -676,41 +679,25 @@ struct MCDCCoverageBuilder { return E->getOpcode() == BO_LAnd; } - /// Push an ID onto the corresponding RHS stack. - void pushRHS(const BinaryOperator *E) { -llvm::SmallVector = isLAnd(E) ? AndRHS : OrRHS; -

[clang] [llvm] [lldb] [flang] [clang] Split out DebugOptions.def into its own top-level options group. (PR #75530)

2024-01-17 Thread Juergen Ributzka via cfe-commits
ributzka wrote: @jansvoboda11 gentle ping https://github.com/llvm/llvm-project/pull/75530 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Update TargetAttr target-cpu override rule (PR #75804)

2024-01-17 Thread Michael Maitland via cfe-commits
@@ -482,5 +482,35 @@ ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const { Ret.Tune = AttrString; } } + + StringRef MCPU = this->getTargetOpts().CPU; + StringRef MTune = this->getTargetOpts().TuneCPU; + + // attr-cpu override march only

[clang] [llvm] [RISCV] Update TargetAttr target-cpu override rule (PR #75804)

2024-01-17 Thread Craig Topper via cfe-commits
@@ -482,5 +482,35 @@ ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const { Ret.Tune = AttrString; } } + + StringRef MCPU = this->getTargetOpts().CPU; + StringRef MTune = this->getTargetOpts().TuneCPU; + + // attr-cpu override march only

[llvm] [clang] [RISCV] Update TargetAttr target-cpu override rule (PR #75804)

2024-01-17 Thread Michael Maitland via cfe-commits
@@ -482,5 +482,35 @@ ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const { Ret.Tune = AttrString; } } + + StringRef MCPU = this->getTargetOpts().CPU; + StringRef MTune = this->getTargetOpts().TuneCPU; + + // attr-cpu override march only

[clang-tools-extra] [llvm] [lld] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

2024-01-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks closed https://github.com/llvm/llvm-project/pull/73045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1b60ddd - [Hurd] Fix -Wswitch in Hurd::getDynamicLinker (NFC)

2024-01-17 Thread Jie Fu via cfe-commits
Author: Jie Fu Date: 2024-01-18T07:34:09+08:00 New Revision: 1b60ddd920e0caadfa85cc7013b559d6453d7e3e URL: https://github.com/llvm/llvm-project/commit/1b60ddd920e0caadfa85cc7013b559d6453d7e3e DIFF: https://github.com/llvm/llvm-project/commit/1b60ddd920e0caadfa85cc7013b559d6453d7e3e.diff LOG:

Re: [clang] cf3421d - [Format] Fix a warning

2024-01-17 Thread David Blaikie via cfe-commits
In general, if the lambda is only used within its scope, I'd suggest switching to a default ref capture "[&]" to reduce maintenance burden of keeping the capture list up to date. On Thu, Jan 11, 2024 at 12:09 PM Kazu Hirata via cfe-commits < cfe-commits@lists.llvm.org> wrote: > > Author: Kazu

Re: [clang] d5000e9 - rename to 'try' isntead of 'Try'x

2024-01-17 Thread David Blaikie via cfe-commits
Be good to have more description of "why" in commit messages in general (the "what" is provided by the patch itself, especially when it's a small one like this) - I guess this was to match naming conventions, that this file generally already follows lower-first, etc. On Tue, Jan 16, 2024 at 7:04 

[clang-tools-extra] [llvm] [lld] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

2024-01-17 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/73045 >From 0145020ef2a803ec797e42f95bacde05dc32eac1 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Tue, 21 Nov 2023 14:01:04 -0800 Subject: [PATCH 1/3] [lld/ELF] Hint if R_X86_64_PC32 overflows and references

[llvm] [clang] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave updated https://github.com/llvm/llvm-project/pull/78489 >From b4e14471727c59634daeec58ff60b8c32c5f2961 Mon Sep 17 00:00:00 2001 From: Min Hsu Date: Wed, 17 Jan 2024 10:28:14 -0800 Subject: [PATCH 1/3] [RISCV] Add support for Smepmp 1.0 Smepmp is a supervisor

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Samuel Thibault (sthibaul) Changes We do not handle all architectures, llvm_unreachable is called after the switch, so we can just break. Fixes https://lab.llvm.org/buildbot/#/builders/19/builds/23702 --- Full diff:

[clang] hurd: Fix build with -Werror,-Wswitch (PR #78520)

2024-01-17 Thread Samuel Thibault via cfe-commits
https://github.com/sthibaul created https://github.com/llvm/llvm-project/pull/78520 We do not handle all architectures, llvm_unreachable is called after the switch, so we can just break. Fixes https://lab.llvm.org/buildbot/#/builders/19/builds/23702 >From

[libc] [lldb] [lld] [libcxx] [compiler-rt] [flang] [clang] [llvm] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/75883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] af0ee61 - [Clang] Support MSPropertyRefExpr as placement arg to new-expression (#75883)

2024-01-17 Thread via cfe-commits
Author: Sirraide Date: 2024-01-17T15:09:31-08:00 New Revision: af0ee617fc5f69051297b0c23f8c818b20f02c3a URL: https://github.com/llvm/llvm-project/commit/af0ee617fc5f69051297b0c23f8c818b20f02c3a DIFF: https://github.com/llvm/llvm-project/commit/af0ee617fc5f69051297b0c23f8c818b20f02c3a.diff

[libc] [lldb] [lld] [libcxx] [compiler-rt] [flang] [clang] [llvm] [Clang] Support MSPropertyRefExpr as placement arg to new-expression (PR #75883)

2024-01-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/75883 >From 849b21f202f3c643c12f237920b137c3506996e7 Mon Sep 17 00:00:00 2001 From: Sirraide Date: Tue, 19 Dec 2023 02:48:25 +0100 Subject: [PATCH 1/6] [Clang] Support MSPropertyRefExpr as placement arg to

[clang] Make getAttr, getSpecificAttr, hasAttr, and hasSpecificAttr variadic (PR #78518)

2024-01-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Created as a draft, but I'd still love feedback on the approach, see if there is anyone with ideas on how to manage the 'might take just a single attr, might take a container + variadic list' functionality (as combining a default and a variadic

[clang] Make getAttr, getSpecificAttr, hasAttr, and hasSpecificAttr variadic (PR #78518)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -1478,11 +1478,10 @@ static bool IsOverloadOrOverrideImpl(Sema , FunctionDecl *New, return true; // enable_if attributes are an order-sensitive part of the signature. - for (specific_attr_iterator - NewI = New->specific_attr_begin(), - NewE =

[clang] Make getAttr, getSpecificAttr, hasAttr, and hasSpecificAttr variadic (PR #78518)

2024-01-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/78518 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Make getAttr, getSpecificAttr, hasAttr, and hasSpecificAttr variadic (PR #78518)

2024-01-17 Thread Erich Keane via cfe-commits
@@ -43,80 +55,102 @@ class specific_attr_iterator { mutable Iterator Current; void AdvanceToNext() const { -while (!isa(*Current)) +while (!isa(*Current)) ++Current; } void AdvanceToNext(Iterator I) const { -while (Current != I &&

[clang] Make getAttr, getSpecificAttr, hasAttr, and hasSpecificAttr variadic (PR #78518)

2024-01-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/78518 Discussed elsewhere, it makes sense to have these functions be variadic. They work as an 'or', that is, 'has*Attr' is "one of the set", and "get*Attr" means "first of the set". This is accomplished by

[clang] [clang] Fix CTAD for aggregates for nested template classes (PR #78387)

2024-01-17 Thread via cfe-commits
https://github.com/antangelo closed https://github.com/llvm/llvm-project/pull/78387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 04a69a1 - [clang] Fix CTAD for aggregates for nested template classes (#78387)

2024-01-17 Thread via cfe-commits
Author: antangelo Date: 2024-01-17T18:03:20-05:00 New Revision: 04a69a10f63dae3c03cdfa5e199d8ea4458398b5 URL: https://github.com/llvm/llvm-project/commit/04a69a10f63dae3c03cdfa5e199d8ea4458398b5 DIFF: https://github.com/llvm/llvm-project/commit/04a69a10f63dae3c03cdfa5e199d8ea4458398b5.diff

[clang] Add Variadic 'dropAttrs' (PR #78476)

2024-01-17 Thread Erich Keane via cfe-commits
https://github.com/erichkeane closed https://github.com/llvm/llvm-project/pull/78476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3db5c05 - Add Variadic 'dropAttrs' (#78476)

2024-01-17 Thread via cfe-commits
Author: Erich Keane Date: 2024-01-17T15:01:53-08:00 New Revision: 3db5c058ff595e7d2f3a9df8c3bf265e54332a07 URL: https://github.com/llvm/llvm-project/commit/3db5c058ff595e7d2f3a9df8c3bf265e54332a07 DIFF: https://github.com/llvm/llvm-project/commit/3db5c058ff595e7d2f3a9df8c3bf265e54332a07.diff

[clang] [X86_64] fix empty structure vaarg in c++ (PR #77907)

2024-01-17 Thread Eli Friedman via cfe-commits
@@ -2988,7 +2988,10 @@ static Address EmitX86_64VAArgFromMemory(CodeGenFunction , // AMD64-ABI 3.5.7p5: Step 10. Align l->overflow_arg_area upwards to // an 8 byte boundary. - uint64_t SizeInBytes = (CGF.getContext().getTypeSize(Ty) + 7) / 8; + uint64_t SizeInBytes =

[clang] 0f67c7a - [clang] Disable gch-probe.c on AIX as `-gmodules` is not supported there yet. (#78513)

2024-01-17 Thread via cfe-commits
Author: Michael Spencer Date: 2024-01-17T14:40:00-08:00 New Revision: 0f67c7a0af271888930bb315c85d05d3936e265a URL: https://github.com/llvm/llvm-project/commit/0f67c7a0af271888930bb315c85d05d3936e265a DIFF:

[clang] [clang] Disable gch-probe.c on AIX as `-gmodules` is not supported there yet. (PR #78513)

2024-01-17 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese closed https://github.com/llvm/llvm-project/pull/78513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

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

[clang] 5133a8f - [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (#77244)

2024-01-17 Thread via cfe-commits
Author: Fangrui Song Date: 2024-01-17T14:39:28-08:00 New Revision: 5133a8f5590d74d9d15631742a3d84f978394dbd URL: https://github.com/llvm/llvm-project/commit/5133a8f5590d74d9d15631742a3d84f978394dbd DIFF: https://github.com/llvm/llvm-project/commit/5133a8f5590d74d9d15631742a3d84f978394dbd.diff

[clang] [llvm] Hurd: Add x86_64 support (PR #78065)

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

[clang] 4fffb04 - Hurd: Add x86_64 support (#78065)

2024-01-17 Thread via cfe-commits
Author: Samuel Thibault Date: 2024-01-17T14:38:40-08:00 New Revision: 4fffb0401be10dc155e8b51321735f14f88c2589 URL: https://github.com/llvm/llvm-project/commit/4fffb0401be10dc155e8b51321735f14f88c2589 DIFF:

[clang] [Clang][SME] Detect always_inline used with mismatched streaming attributes (PR #77936)

2024-01-17 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: There's no general rule that forbids taking the address of an always_inline function. So if a user really wants to, they can call a mismatched always_inline function anyway. Given that, making this a hard error seems a bit dubious; it should probably be a warning

[clang-tools-extra] [clang] [llvm] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

2024-01-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/77244 >From f4758993998e221cc41924d8ec9feb70f759937a Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 7 Jan 2024 09:47:53 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [clang] Disable gch-probe.c on AIX as `-gmodules` is not supported there yet. (PR #78513)

2024-01-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Spencer (Bigcheese) Changes Followup fix for https://github.com/llvm/llvm-project/pull/77711 --- Full diff: https://github.com/llvm/llvm-project/pull/78513.diff 1 Files Affected: - (modified) clang/test/PCH/gch-probe.c (+4)

[clang] [clang] Disable gch-probe.c on AIX as `-gmodules` is not supported there yet. (PR #78513)

2024-01-17 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese created https://github.com/llvm/llvm-project/pull/78513 Followup fix for https://github.com/llvm/llvm-project/pull/77711 >From a12b3ab8663c591f66848a7e46620a79583f5045 Mon Sep 17 00:00:00 2001 From: Michael Spencer Date: Wed, 17 Jan 2024 14:27:03 -0800 Subject:

[clang-tools-extra] [lld] [llvm] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

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

[clang-tools-extra] [lld] [llvm] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

2024-01-17 Thread Fangrui Song via cfe-commits
@@ -105,6 +105,13 @@ void elf::reportRangeError(uint8_t *loc, const Relocation , const Twine , hint = "; references '" + lld::toString(*rel.sym) + '\''; else if (auto *d = dyn_cast(rel.sym)) hint = ("; references section '" + d->section->name + "'").str(); + +

[clang-tools-extra] [llvm] [lld] [lld/ELF] Hint if R_X86_64_PC32 overflows and references a SHF_X86_64_LARGE section (PR #73045)

2024-01-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/73045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-17 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Ah, looks like all the other gmodules tests have: ``` // Unsupported on AIX because we don't support the requisite "__clangast" // section in XCOFF yet. // UNSUPPORTED: target={{.*}}-aix{{.*}} ``` I'll just add that. https://github.com/llvm/llvm-project/pull/77711

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Min-Yih Hsu via cfe-commits
@@ -92,6 +92,7 @@ on support follow. ``M``Supported ``Smaia``Supported ``Ssaia``Supported + ``Smepmp`` Supported mshockwave wrote: Done. https://github.com/llvm/llvm-project/pull/78489

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Min-Yih Hsu via cfe-commits
@@ -56,6 +56,7 @@ static const RISCVSupportedExtension SupportedExtensions[] = { {"smaia", {1, 0}}, {"ssaia", {1, 0}}, +{"smepmp", {1, 0}}, mshockwave wrote: Done. https://github.com/llvm/llvm-project/pull/78489

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave updated https://github.com/llvm/llvm-project/pull/78489 >From b4e14471727c59634daeec58ff60b8c32c5f2961 Mon Sep 17 00:00:00 2001 From: Min Hsu Date: Wed, 17 Jan 2024 10:28:14 -0800 Subject: [PATCH 1/2] [RISCV] Add support for Smepmp 1.0 Smepmp is a supervisor

[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)

2024-01-17 Thread Michael Spencer via cfe-commits
Bigcheese wrote: Yep, I'll take a look. https://github.com/llvm/llvm-project/pull/77711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Update Unicode version to 15.1 (PR #77147)

2024-01-17 Thread Fangrui Song via cfe-commits
MaskRay wrote: Nice! I wonder whether there is any documentation/procedure notes to facilitate future updates, like: what files need to be updated? https://github.com/llvm/llvm-project/pull/77147 ___ cfe-commits mailing list

[clang] 58b77b8 - [OpenACC] Implement 'bind' clause parsing.

2024-01-17 Thread via cfe-commits
Author: erichkeane Date: 2024-01-17T14:07:34-08:00 New Revision: 58b77b8581989a960bcb3bd088ac4a3e00c9fdb5 URL: https://github.com/llvm/llvm-project/commit/58b77b8581989a960bcb3bd088ac4a3e00c9fdb5 DIFF: https://github.com/llvm/llvm-project/commit/58b77b8581989a960bcb3bd088ac4a3e00c9fdb5.diff

[clang] [llvm] [clang-tools-extra] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

2024-01-17 Thread via cfe-commits
https://github.com/pirama-arumuga-nainar approved this pull request. https://github.com/llvm/llvm-project/pull/77244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

2024-01-17 Thread via cfe-commits
@@ -1347,7 +1347,24 @@ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD-LINK %s // CHECK-ANDROID-PTHREAD-LINK-NOT: argument unused during compilation: '-pthread' -// + +/// Check -fandroid-pad-segment. +//

[clang] [llvm] [clang-tools-extra] [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (PR #77244)

2024-01-17 Thread via cfe-commits
https://github.com/pirama-arumuga-nainar edited https://github.com/llvm/llvm-project/pull/77244 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Craig Topper via cfe-commits
@@ -92,6 +92,7 @@ on support follow. ``M``Supported ``Smaia``Supported ``Ssaia``Supported + ``Smepmp`` Supported topperc wrote: I think this list is aphabetized.

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Craig Topper via cfe-commits
@@ -56,6 +56,7 @@ static const RISCVSupportedExtension SupportedExtensions[] = { {"smaia", {1, 0}}, {"ssaia", {1, 0}}, +{"smepmp", {1, 0}}, topperc wrote: This is required to be alphabetized. It won't pass lit tests if it isn't. Might even fail

[llvm] [clang] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Min-Yih Hsu via cfe-commits
@@ -716,6 +716,13 @@ def FeatureStdExtSmaia "AIA specifies for a hart, over all privilege levels.)", []>; +def FeatureStdExtSmepmp mshockwave wrote: > Can we keep smaia and ssaia together since they come from the

[llvm] [clang] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Min-Yih Hsu via cfe-commits
mshockwave wrote: > Needs to be added to RISCVUsage.rst, and probably a note in the release docs > as well. It's done now. https://github.com/llvm/llvm-project/pull/78489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Clang] Update Unicode version to 15.1 (PR #77147)

2024-01-17 Thread via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/77147 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add support for Smepmp 1.0 (PR #78489)

2024-01-17 Thread Min-Yih Hsu via cfe-commits
https://github.com/mshockwave updated https://github.com/llvm/llvm-project/pull/78489 >From 84783b38744bc2bb46cb8d62db206864709a5e22 Mon Sep 17 00:00:00 2001 From: Min Hsu Date: Wed, 17 Jan 2024 10:28:14 -0800 Subject: [PATCH 1/2] [RISCV] Add support for Smepmp 1.0 Smepmp is a supervisor

[clang] [llvm] [RISCV] Update TargetAttr target-cpu override rule (PR #75804)

2024-01-17 Thread Craig Topper via cfe-commits
@@ -482,5 +482,35 @@ ParsedTargetAttr RISCVTargetInfo::parseTargetAttr(StringRef Features) const { Ret.Tune = AttrString; } } + + StringRef MCPU = this->getTargetOpts().CPU; + StringRef MTune = this->getTargetOpts().TuneCPU; + + // attr-cpu override march only

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-17 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: If we pass `-v` to Clang, we get the following include directories: without this patch: ``` clang -cc1 version 18.0.0git based upon LLVM 18.0.0git default target arm64-apple-darwin23.3.0 ignoring nonexistent directory

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-17 Thread Shafik Yaghmour via cfe-commits
@@ -238,3 +239,236 @@ void init_capture_init_list() { // CHECK: call {{.*}}dtor // CHECK: } } + +namespace P2718R0 { shafik wrote: Is it possible to also test the case where it does not clean up like in the proposal: ```cpp for (auto e : f2(g())) {} //

[clang] [Clang] Implement P2718R0 "Lifetime extension in range-based for loops" (PR #76361)

2024-01-17 Thread Shafik Yaghmour via cfe-commits
@@ -2312,12 +2312,31 @@ Parser::DeclGroupPtrTy Parser::ParseDeclGroup(ParsingDeclSpec , bool IsForRangeLoop = false; if (TryConsumeToken(tok::colon, FRI->ColonLoc)) { IsForRangeLoop = true; + EnterExpressionEvaluationContext ForRangeInitContext( +

[clang] [llvm] [LinkerWrapper] Handle AMDGPU Target-IDs correctly when linking (PR #78359)

2024-01-17 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/78359 >From d7c8a6e0cb2289af939a90e82afbc6e35b08010c Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Mon, 15 Jan 2024 15:42:06 -0600 Subject: [PATCH 1/3] [LinkerWrapper] Handle AMDGPU Target-IDs correctly when

[compiler-rt] [clang-tools-extra] [flang] [llvm] [lldb] [mlir] [clang] [lld] [libcxx] [DWARFLinker][NFC] Decrease DWARFLinker dependence on DwarfStreamer. (PR #77932)

2024-01-17 Thread Jonas Devlieghere via cfe-commits
@@ -30,6 +30,20 @@ using namespace llvm; using namespace dwarf_linker; using namespace dwarf_linker::classic; +Expected> DwarfStreamer::createStreamer( +const Triple , DWARFLinkerBase::OutputFileType FileType, +raw_pwrite_stream , DWARFLinkerBase::TranslatorFuncTy

[clang] [flang] [lldb] [lld] [libcxx] [mlir] [compiler-rt] [clang-tools-extra] [llvm] [DWARFLinker][NFC] Decrease DWARFLinker dependence on DwarfStreamer. (PR #77932)

2024-01-17 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere approved this pull request. Before this patch, the DWARFLinker was the one responsible for creating the streamer, which meant that both the classic and parallel implementation needed to conform to the same interface. After this patch, the concrete

[flang] [llvm] [compiler-rt] [lldb] [clang] [libcxx] [mlir] [lld] [clang-tools-extra] [DWARFLinker][NFC] Decrease DWARFLinker dependence on DwarfStreamer. (PR #77932)

2024-01-17 Thread Jonas Devlieghere via cfe-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/77932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-17 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: Here's what I did to repro: `include.cc`: ```cpp #include ``` Build clang: ``` $ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_LLD=False -DLLVM_CCACHE_BUILD=True -DLLVM_ENABLE_PROJECTS="clang" -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" ../llvm $ ninja clang ``` I

<    1   2   3   4   5   6   >