[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][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] 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-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] [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][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] (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] 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] [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] [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 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
@@ -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-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] [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
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] 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] 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
@@ -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] (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] (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] [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] 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-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] [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 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] 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] 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
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 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] [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] 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-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] [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] 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] 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-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] 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] [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] [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] [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] [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-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] 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] [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
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
@@ -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] [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] [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] 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:

<    1   2   3   4