[clang] [clang] Remove an incorrect assertion in ConstantFoldAttrs (PR #105789)

2024-08-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/105789 Evaluating the attribute expression can be successful without resulting in a value. Namely, when the expression is of type void. >From 920eb8d753070b72b8ba0b2766333d7db9bed0a9 Mon Sep 17 00:00:00 2001 From:

[clang] [clang] force libc linked with --no-as-needed when using compiler-rt (PR #95848)

2024-08-22 Thread Fangrui Song via cfe-commits
MaskRay wrote: > ```shell > ../build/bin/clang test.c -o libtest.so -fPIC -shared -v -Wl,--as-needed > -Wl,--trace-symbol=__cxa_finalize > ``` This command line does not close `--as-needed` with `--no-as-needed`, so `-lc` is linked in `as-needed` mode. The driver is not responsible for forcing

[clang] [clang] force libc linked with --no-as-needed when using compiler-rt (PR #95848)

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

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

2024-08-22 Thread Piyou Chen via cfe-commits
@@ -63,9 +63,55 @@ class RISCVABIInfo : public DefaultABIInfo { CharUnits Field2Off) const; ABIArgInfo coerceVLSVector(QualType Ty) const; + + using ABIInfo::appendAttributeMangling; + void appendAttributeMangling(TargetClones

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

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

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

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

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

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

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

2024-08-22 Thread Piyou Chen via cfe-commits
@@ -63,9 +63,55 @@ class RISCVABIInfo : public DefaultABIInfo { CharUnits Field2Off) const; ABIArgInfo coerceVLSVector(QualType Ty) const; + + using ABIInfo::appendAttributeMangling; + void appendAttributeMangling(TargetClones

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

2024-08-22 Thread Piyou Chen via cfe-commits
https://github.com/BeMg updated https://github.com/llvm/llvm-project/pull/85786 >From 395ce72afbf9e4b12fcbfaf9cdbda8921c9ff72a Mon Sep 17 00:00:00 2001 From: Piyou Chen Date: Tue, 23 Jul 2024 19:59:06 -0700 Subject: [PATCH 01/11] [RISCV][FMV] Support target_clones --- .../clang/Basic/Diagnosti

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

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

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

2024-08-22 Thread Haojian Wu via cfe-commits
hokein wrote: Sorry for the breakage, and thanks for the revert. This is not expected, I will take a look. https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang-tools-extra] [clangd] fix crash in include cleaner (PR #99514)

2024-08-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Looks like I definitely don't understand what's going on. Instead let me try > a more conservative fix. This should preserve what the current code is doing > and just fix the assertion failure. Could you say more about what problem you ran into with the first fix approa

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-22 Thread Owen Pan via cfe-commits
@@ -848,6 +848,11 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, const auto IsSimpleFunction = [&](const FormatToken &Tok) { if (!Tok.FakeLParens.empty() && Tok.FakeLParens.back() > prec::Unknown) return false; +// Nested cal

[clang] [clang-format] Treat new expressions as simple functions (PR #105168)

2024-08-22 Thread Owen Pan via cfe-commits
@@ -848,6 +848,8 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun, const auto IsSimpleFunction = [&](const FormatToken &Tok) { if (!Tok.FakeLParens.empty() && Tok.FakeLParens.back() > prec::Unknown) return false; +if (Tok.is(tok

[clang] [NFC] Fix an incorrect comment about operator precedence. (PR #105784)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Park (mpark) Changes The comment talks about left-associative operators twice, when the latter mention is actually describing right-associative operators. --- Full diff: https://github.com/llvm/llvm-project/pull/105784.diff 1 Fi

[clang] [NFC] Fix an incorrect comment about operator precedence. (PR #105784)

2024-08-22 Thread Michael Park via cfe-commits
https://github.com/mpark created https://github.com/llvm/llvm-project/pull/105784 The comment talks about left-associative operators twice, when the latter mention is actually describing right-associative operators. >From 9c90592726137fabbcbc7388b3ce0d4bc496bfc6 Mon Sep 17 00:00:00 2001 From:

[clang] [clang] force libc linked with --no-as-needed when using compiler-rt (PR #95848)

2024-08-22 Thread via cfe-commits
ziyao233 wrote: ping @MaskRay @jansvoboda11 https://github.com/llvm/llvm-project/pull/95848 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-22 Thread Owen Pan via cfe-commits
@@ -4050,7 +4050,7 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const { ChildSize + Current->SpacesRequiredBefore; } -if (Current->is(TT_CtorInitializerColon)) +if (Current->isOneOf(TT_CtorInitializerColo

[clang] [clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (PR #96804)

2024-08-22 Thread Owen Pan via cfe-commits
owenca wrote: > @mydeveloperday, what do you think, is this good to merge? @mydeveloperday can we merge this? https://github.com/llvm/llvm-project/pull/96804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [Clang] prevent assertion failure when converting vectors to int/float with invalid expressions (PR #105727)

2024-08-22 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/105727 >From d8bed3f4db8056a6afa9bd7eae5d4a8361f83086 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Thu, 22 Aug 2024 23:25:31 +0300 Subject: [PATCH] [Clang] prevent assertion failure when converting vectors to i

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

2024-08-22 Thread via cfe-commits
github-actions[bot] wrote: @VolatileAcorn Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a

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

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

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

2024-08-22 Thread via cfe-commits
Author: Tom Date: 2024-08-22T21:42:22-07:00 New Revision: 7c3237d778572931ff097e81df43d0bce9d1d4f8 URL: https://github.com/llvm/llvm-project/commit/7c3237d778572931ff097e81df43d0bce9d1d4f8 DIFF: https://github.com/llvm/llvm-project/commit/7c3237d778572931ff097e81df43d0bce9d1d4f8.diff LOG: [cla

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-22 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From 869b955eb55bc53e445a8809b56c702d7c312b46 Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/4] [clang][ASTMatcher] Add matches for StringLiteral which matches

[clang] Allow installation of Clang .cfg files if they where generated. (PR #105580)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vladimir Vereschaka (vvereschaka) Changes Add 'install-clang-configs' target to install the build-generated configuration files (.cfg) into the destination 'bin' folder together with clang[++] executables. The build-generated configurati

[clang] Allow installation of Clang .cfg files if they where generated. (PR #105580)

2024-08-22 Thread Vladimir Vereschaka via cfe-commits
https://github.com/vvereschaka ready_for_review https://github.com/llvm/llvm-project/pull/105580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Allow installation of Clang .cfg files if they where generated. (PR #105580)

2024-08-22 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: The failed checks are related with the `std/algorithms/alg.sorting/alg.merge/pstl.merge.pass.cpp` libc++ failed test. https://github.com/llvm/llvm-project/pull/105580 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] Allow installation of Clang .cfg files if they where generated. (PR #105580)

2024-08-22 Thread Vladimir Vereschaka via cfe-commits
vvereschaka wrote: > Apologies, I'm starting a 3-week vacation this Friday and will have limited > availability. Happy for other reviewers to approve. Ok, got it. Have a great vacation! https://github.com/llvm/llvm-project/pull/105580 ___ cfe-commits

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

2024-08-22 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#105773 https://github.com/llvm/llvm-project/pull/105043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-22 Thread Owen Pan via cfe-commits
owenca wrote: /cherry-pick 714033a6bf3a81b1350f969ddd83bcd9fbb703e8 https://github.com/llvm/llvm-project/pull/105043 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

2024-08-22 Thread via cfe-commits
Author: Owen Pan Date: 2024-08-22T20:02:48-07:00 New Revision: 714033a6bf3a81b1350f969ddd83bcd9fbb703e8 URL: https://github.com/llvm/llvm-project/commit/714033a6bf3a81b1350f969ddd83bcd9fbb703e8 DIFF: https://github.com/llvm/llvm-project/commit/714033a6bf3a81b1350f969ddd83bcd9fbb703e8.diff LOG:

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-22 Thread Chris Apple via cfe-commits
cjappl wrote: At least 3 more failures in this way since this reversion: https://lab.llvm.org/buildbot/#/builders/159/builds/4477 https://lab.llvm.org/buildbot/#/builders/159/builds/4478 https://lab.llvm.org/buildbot/#/builders/159/builds/4479 I am going to re-land this tomorrow when I wake up

[clang] (Draft) [Clang][AArch64] Diagnose invalid system register name (PR #105766)

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

[clang] (Draft) [Clang][AArch64] Diagnose invalid system register name (PR #105766)

2024-08-22 Thread via cfe-commits
https://github.com/v01dXYZ updated https://github.com/llvm/llvm-project/pull/105766 >From 5f098139422f1ac7beeaa2ec9b762e2f6f7d4ca0 Mon Sep 17 00:00:00 2001 From: v01dxyz Date: Wed, 21 Aug 2024 23:03:01 +0200 Subject: [PATCH] (Draft) [Clang][AArch64] Diagnose invalid system register name ---

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Fangrui Song via cfe-commits
@@ -30,8 +29,10 @@ // RUN: | FileCheck --check-prefix=CHECK-FPC-FAST %s // RUN: %clang -### -ffast-math -ffp-contract=fast-honor-pragmas -c %s 2>&1 \ -// RUN: | FileCheck --check-prefixes=CHECK-FPC-FAST-HONOR,WARN_FM_FHP %s -// CHECK-FPC-FAST-HONOR: "-ffp-contract=fast

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Thanks for doing this! I support this direction as mentioned in #100453 (I'm starting a 3-week vacation this Friday and will have limited availability. Happy for other reviewers to approve.) https://github.com/llvm/llvm-project/pull/105746

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

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

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-22 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul edited https://github.com/llvm/llvm-project/pull/105745 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-08-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Yeah, while the implementation need to be polished, the shape is what I want. https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-22 Thread Rahul Joshi via cfe-commits
@@ -74,16 +75,31 @@ class formatv_object_base { static std::pair splitLiteralAndReplacement(StringRef Fmt); - formatv_object_base(StringRef Fmt, + formatv_object_base(StringRef Fmt, bool ValidateNumArgs, ArrayRef Adapters) - : Fmt(Fmt), Adapte

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-08-22 Thread Fangrui Song via cfe-commits
@@ -130,7 +143,7 @@ class MultilibSet { /// Select compatible variants, \returns false if none are compatible bool select(const Multilib::flags_list &Flags, MaskRay wrote: For other parts of Driver, I think `const Driver &` is more commonly used as the f

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-08-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: I'm starting a 3-week vacation this Friday and will have limited availability. Happy for other reviewers to approve. https://github.com/llvm/llvm-project/pull/105684 ___ cfe-commits mailing list cfe-commits@lists.

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

2024-08-22 Thread Fangrui Song via cfe-commits
@@ -0,0 +1,63 @@ +# REQUIRES: shell +# UNSUPPORTED: system-windows + +# RUN: rm -rf %T/baremetal_multilib MaskRay wrote: do not use `%T` https://llvm.org/docs/CommandGuide/lit.html#substitutions just use `rm -rf %t && mkdir %t` for what you do with `%T/baremeta

[clang] [clang][Driver] Add a custom error option in multilib.yaml. (PR #105684)

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

[clang] Allow installation of Clang .cfg files if they where generated. (PR #105580)

2024-08-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: Apologies, I'm starting a 3-week vacation this Friday and will have limited availability. Happy for other reviewers to approve. https://github.com/llvm/llvm-project/pull/105580 ___ cfe-commits mailing list cfe-com

[clang] (Draft) [Clang][AArch64] Diagnose invalid system register name (PR #105766)

2024-08-22 Thread via cfe-commits
https://github.com/v01dXYZ created https://github.com/llvm/llvm-project/pull/105766 Fixes https://github.com/llvm/llvm-project/issues/104614 >From 9861e901f45671f9bcf9398884dea54275d99520 Mon Sep 17 00:00:00 2001 From: v01dxyz Date: Wed, 21 Aug 2024 23:03:01 +0200 Subject: [PATCH] (Draft) [Cla

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-22 Thread via cfe-commits
@@ -2503,6 +2503,28 @@ TEST_P(ASTMatchersTest, IsDelegatingConstructor) { cxxConstructorDecl(isDelegatingConstructor(), parameterCountIs(1; } +TEST_P(ASTMatchersTest, MatchesString) { + StatementMatcher Literal = stringLiteral(matchesString("foo.*")); + EXPECT_TRUE

[clang] [clang][ASTMatcher] Add `matchesString` for `StringLiteral` which matches literals on given `RegExp` (PR #102152)

2024-08-22 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From 869b955eb55bc53e445a8809b56c702d7c312b46 Mon Sep 17 00:00:00 2001 From: hehouhua Date: Wed, 7 Aug 2024 11:55:30 +0800 Subject: [PATCH 1/3] [clang][ASTMatcher] Add matches for StringLiteral which matches

[clang] [clang-tools-extra] [lldb] [llvm] [mlir] [Support] Validate number of arguments passed to formatv() (PR #105745)

2024-08-22 Thread Yanzuo Liu via cfe-commits
@@ -74,16 +75,31 @@ class formatv_object_base { static std::pair splitLiteralAndReplacement(StringRef Fmt); - formatv_object_base(StringRef Fmt, + formatv_object_base(StringRef Fmt, bool ValidateNumArgs, ArrayRef Adapters) - : Fmt(Fmt), Adapte

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > Is the backend actually ready for this? Looking quickly at the backend, it > looks like target-independent code is fine, but some of the target-specific > code doesn't respect the "contract" flag on instructions. I didn't realize I wasn't building all targets in my local sa

[clang] [clang][NFC] order C++ standards in reverse in release notes (PR #104866)

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

[clang] ecfceb8 - [clang][NFC] order C++ standards in reverse in release notes (#104866)

2024-08-22 Thread via cfe-commits
Author: h-vetinari Date: 2024-08-23T07:51:25+08:00 New Revision: ecfceb890d47e4c11804cdc2c38f905f691ef397 URL: https://github.com/llvm/llvm-project/commit/ecfceb890d47e4c11804cdc2c38f905f691ef397 DIFF: https://github.com/llvm/llvm-project/commit/ecfceb890d47e4c11804cdc2c38f905f691ef397.diff LO

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-22 Thread Chris Apple via cfe-commits
cjappl wrote: Thanks for taking a look @Sirraide , greatly appreciated. https://github.com/llvm/llvm-project/pull/102622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-22 Thread via cfe-commits
Sirraide wrote: I haven’t looked too much into this, but yeah, this sounds like it might have just been an unrelated CI failure https://github.com/llvm/llvm-project/pull/102622 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-22 Thread Chris Apple via cfe-commits
cjappl wrote: Tests continue to fail after reverting this: https://lab.llvm.org/buildbot/#/builders/159/builds/4474 I am trying to bisect locally, I will likely reland this with no modifications tomorrow if it continues to look like this did not contribute to the build failures. https://git

[clang] [clang][NFC] order C++ standards in reverse in release notes (PR #104866)

2024-08-22 Thread via cfe-commits
h-vetinari wrote: Gentle ping on this (I don't have the commit bit). https://github.com/llvm/llvm-project/pull/104866 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Andy Kaylor via cfe-commits
@@ -68,35 +68,12 @@ // RUN: -O3 -target-cpu gfx906 -o - -x ir %t.ll \ // RUN: | FileCheck -check-prefixes=COMMON,AMD-OPT-FASTSTD %s -// Explicit -ffp-contract=fast-honor-pragmas -// In IR, fmul/fadd instructions with contract flag are emitted. -// In backend -//nvptx/a

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: It doesn't fuse unless AllowFPOpFusion is set. https://github.com/llvm/llvm-project/pull/105746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][compiler-rt][test] Removed dirname command substitutions from tests (PR #105754)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Connie Zhu (connieyzhu) Changes This patch rewrites tests in clang and compiler-rt that uses bash command substitution syntax $() to execute the dirname command. This is done so that the tests can be run

[clang] Re-land "[clang] Merge lifetimebound and GSL code paths for li… (PR #105753)

2024-08-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/105753 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [clang][compiler-rt][test] Removed dirname command substitutions from tests (PR #105754)

2024-08-22 Thread Connie Zhu via cfe-commits
https://github.com/connieyzhu created https://github.com/llvm/llvm-project/pull/105754 This patch rewrites tests in clang and compiler-rt that uses bash command substitution syntax $() to execute the dirname command. This is done so that the tests can be run using lit's internal shell. Fixes

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Andy Kaylor via cfe-commits
@@ -3178,6 +3178,13 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, StringRef Val = A->getValue(); if (Val == "fast" || Val == "on" || Val == "off" || Val == "fast-honor-pragmas") { +// fast-honor-pragmas is depreca

[clang] Re-land "[clang] Merge lifetimebound and GSL code paths for li… (PR #105753)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes ... just for visibility --- Patch is 25.79 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/105753.diff 3 Files Affected: - (modified) clang/docs/ReleaseNotes.

[clang] Re-land "[clang] Merge lifetimebound and GSL code paths for li… (PR #105753)

2024-08-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/105753 ... just for visibility >From 04376ece0618912d85a9a52a5f00f3eb3aa63c30 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Thu, 22 Aug 2024 16:38:31 -0700 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"[clang]=

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

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vitaly Buka (vitalybuka) Changes Revert as it breaks libc++ tests, see #104906. This reverts commit c368a720a0b40bb8fe4aff3971fe9a7009c85aa6. --- Patch is 25.78 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/l

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

2024-08-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/105752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1df1504 - Revert "[clang] Merge lifetimebound and GSL code paths for lifetime analysis (#104906)" (#105752)

2024-08-22 Thread via cfe-commits
Author: Vitaly Buka Date: 2024-08-22T16:38:19-07:00 New Revision: 1df15042bdda3817827e39c772525a4a24c1adbe URL: https://github.com/llvm/llvm-project/commit/1df15042bdda3817827e39c772525a4a24c1adbe DIFF: https://github.com/llvm/llvm-project/commit/1df15042bdda3817827e39c772525a4a24c1adbe.diff L

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

2024-08-22 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/105752 Revert as it breaks libc++ tests, see #104906. This reverts commit c368a720a0b40bb8fe4aff3971fe9a7009c85aa6. >From 1482dc3f18243d09e7d205b724c76d69c0284b99 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date:

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > Is the backend actually ready for this? Looking quickly at the backend, it > looks like target-independent code is fine, but some of the target-specific > code doesn't respect the "contract" flag on instructions. Doesn't respect it in what way? Do you mean it doesn't attemp

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

2024-08-22 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: Also https://lab.llvm.org/buildbot/#/builders/164/builds/2291 https://github.com/llvm/llvm-project/pull/104906 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-22 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/97103 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-08-22 Thread Aaron Puchert via cfe-commits
aaronpuchert wrote: > > Yeah, it's a tricky question. On one hand there have been previous issues > > like #42194 (which this would basically address), and it would definitely > > improve consistency and prevent beginner's mistakes. On the other hand it > > seems useful to allow adding attribu

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

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

[clang] [Clang] Remove 3-element vector load and store special handling (PR #104661)

2024-08-22 Thread Eli Friedman via cfe-commits
@@ -45,7 +45,7 @@ void test3(packedfloat3 *p) { *p = (packedfloat3) { 3.2f, 2.3f, 0.1f }; } // CHECK: @test3( -// CHECK: store <4 x float> {{.*}}, align 4 +// CHECK: store <3 x float> {{.*}}, align 4 efriedma-quic wrote: Even if we can prove it doesn't trap,

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

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

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread John McCall via cfe-commits
@@ -68,35 +68,12 @@ // RUN: -O3 -target-cpu gfx906 -o - -x ir %t.ll \ // RUN: | FileCheck -check-prefixes=COMMON,AMD-OPT-FASTSTD %s -// Explicit -ffp-contract=fast-honor-pragmas -// In IR, fmul/fadd instructions with contract flag are emitted. -// In backend -//nvptx/a

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread John McCall via cfe-commits
@@ -3178,6 +3178,13 @@ static void RenderFloatingPointOptions(const ToolChain &TC, const Driver &D, StringRef Val = A->getValue(); if (Val == "fast" || Val == "on" || Val == "off" || Val == "fast-honor-pragmas") { +// fast-honor-pragmas is depreca

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread John McCall via cfe-commits
@@ -182,18 +182,8 @@ void LangOptions::setLangDefaults(LangOptions &Opts, Language Lang, Opts.HIP = Lang == Language::HIP; Opts.CUDA = Lang == Language::CUDA || Opts.HIP; - if (Opts.HIP) { -// HIP toolchain does not support 'Fast' FPOpFusion in backends since it -

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

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

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

2024-08-22 Thread Joshua Batista via cfe-commits
@@ -551,24 +541,21 @@ getHLSLResourceAttrFromEitherDecl(VarDecl *VD, // the resource attr could be on the record decl itself or on one of // its fields (the resource handle, most commonly) -const auto *Attr = TheRecordDecl->getAttr(); +const auto *Attr = TheRec

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

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

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Eli Friedman via cfe-commits
@@ -348,20 +348,8 @@ static bool initTargetOptions(DiagnosticsEngine &Diags, .Default(llvm::FloatABI::Default); // Set FP fusion mode. - switch (LangOpts.getDefaultFPContractMode()) { - case LangOptions::FPM_Off: -// Preserve any contraction performed by the

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Is the backend actually ready for this? Looking quickly at the backend, it looks like target-independent code is fine, but some of the target-specific code doesn't respect the "contract" flag on instructions. https://github.com/llvm/llvm-project/pul

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/105746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-22 Thread Damyan Pepper via cfe-commits
@@ -551,24 +541,21 @@ getHLSLResourceAttrFromEitherDecl(VarDecl *VD, // the resource attr could be on the record decl itself or on one of // its fields (the resource handle, most commonly) -const auto *Attr = TheRecordDecl->getAttr(); +const auto *Attr = TheRec

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

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

[clang] [clang-tools-extra] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

2024-08-22 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: Otherwise looks good to me. The old terminology is still heavily used internally, but I found the code still readable, so I don't think we need to rewrite all of it. https://github.com/llvm/llvm-project/pull/99919 _

[clang] [clang-tools-extra] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

2024-08-22 Thread Aaron Puchert via cfe-commits
@@ -887,7 +887,7 @@ class LockableFactEntry : public FactEntry { } }; -class ScopedLockableFactEntry : public FactEntry { +class ScopedCapabilityFactEntry : public FactEntry { aaronpuchert wrote: The other derived class is still called `LockableFactEntry`.

[clang] [clang-tools-extra] thread-safety: Support the new capability-based names for all related attributes. (PR #99919)

2024-08-22 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/99919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

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

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

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

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

2024-08-22 Thread Joshua Batista via cfe-commits
@@ -551,24 +541,21 @@ getHLSLResourceAttrFromEitherDecl(VarDecl *VD, // the resource attr could be on the record decl itself or on one of // its fields (the resource handle, most commonly) -const auto *Attr = TheRecordDecl->getAttr(); +const auto *Attr = TheRec

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

2024-08-22 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 `libunwind` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/3020 Here is the relevant piece of t

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 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 172c4a4a147833f1c08df1555f3170aa9ccb6cbe 973e7fb1a09f5479f88616e19642a71edc977b4a --e

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

2024-08-22 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. A few open issues I'd like to see addressed before approving this: * https://github.com/llvm/llvm-project/pull/97103#discussion_r1720126674 * https://github.com/llvm/llvm-project/pull/97103#discussion_r1722532927 * https://github

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang-driver Author: Andy Kaylor (andykaylor) Changes Change the handling of -ffp-contract=fast such that the contract semantics described in the IR are always respected. The front end was already generating IR that ena

[clang] Honor pragmas with -ffp-contract=fast, depecate fast-honor-pragmas (PR #105746)

2024-08-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/105746 Change the handling of -ffp-contract=fast such that the contract semantics described in the IR are always respected. The front end was already generating IR that enabled or disabled contraction as requested by

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

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

[clang] [clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (PR #96804)

2024-08-22 Thread Iuri Chaer via cfe-commits
@@ -5272,22 +5272,46 @@ the configuration (without a prefix: ``Auto``). .. _ReflowComments: -**ReflowComments** (``Boolean``) :versionbadge:`clang-format 3.8` :ref:`¶ ` - If ``true``, clang-format will attempt to re-flow comments. That is it - will touch a comment and *ref

  1   2   3   4   >