[clang] [clang] Additional FP classification functions (PR #69041)

2023-10-14 Thread Timm Baeder via cfe-commits
@@ -494,6 +494,9 @@ BUILTIN(__builtin_isinf, "i.", "FnctE") BUILTIN(__builtin_isinf_sign, "i.", "FnctE") BUILTIN(__builtin_isnan, "i.", "FnctE") BUILTIN(__builtin_isnormal, "i.", "FnctE") +BUILTIN(__builtin_issubnormal,"i.", "FnctE") +BUILTIN(__builtin_iszero, "

[clang] [clang][Interp] IntegralAP zero-init (PR #68081)

2023-10-14 Thread Timm Baeder via cfe-commits
@@ -100,12 +100,13 @@ template class IntegralAP final { } static IntegralAP from(const Boolean &B) { assert(false); -return IntegralAP::zero(); +return IntegralAP::zero(1); tbaederr wrote: I don't have such comments because I opted for `assert

[clang] a653749 - [clang][Interp] Implement compound assign operators on bitfields (#67306)

2023-10-14 Thread via cfe-commits
Author: Timm Baeder Date: 2023-10-14T09:17:35+02:00 New Revision: a653749acab8d5cb84e7f1597e76ebe8c84b URL: https://github.com/llvm/llvm-project/commit/a653749acab8d5cb84e7f1597e76ebe8c84b DIFF: https://github.com/llvm/llvm-project/commit/a653749acab8d5cb84e7f1597e76ebe8c84b.diff L

[clang] [clang][Interp] Implement compound assign operators on bitfields (PR #67306)

2023-10-14 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/67306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-14 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-14 Thread Nick Desaulniers via cfe-commits
https://github.com/nickdesaulniers approved this pull request. https://github.com/llvm/llvm-project/pull/68750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread via cfe-commits
https://github.com/AMS21 created https://github.com/llvm/llvm-project/pull/69045 With this patch we no longer issue a warning for unused parameters which are marked as such. This fixes #68209 >From 04eff97d2154edf49a21d276e3872cef0f64b654 Mon Sep 17 00:00:00 2001 From: AMS21 Date: Sat, 14 Oct

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (AMS21) Changes With this patch we no longer issue a warning for unused parameters which are marked as such. This fixes #68209 --- Full diff: https://github.com/llvm/llvm-project/pull/69045.diff 3 Files Affected: - (modified

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread via cfe-commits
AMS21 wrote: I'm not sure if we should rather have this as an option like `IgnoreUnnamedParams` https://github.com/llvm/llvm-project/pull/69045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-14 Thread via cfe-commits
https://github.com/vabridgers created https://github.com/llvm/llvm-project/pull/69049 This change introduces the bitfield conversion check after fixes to the test case. The original submission unfortunately did not comprehend differences in architecture for the diagnostic messages, leading to

[clang] [Sema] Add check for bitfield assignments to integral types (PR #69049)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (vabridgers) Changes This change introduces the bitfield conversion check after fixes to the test case. The original submission unfortunately did not comprehend differences in architecture for the diagnostic messages, leading to unan

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread Piotr Zegar via cfe-commits
@@ -333,3 +333,22 @@ void instantiate_a_class_template() { AClassTemplate withObjRef(o); withObjRef.never_moves(o); } + +namespace gh68209 +{ + void f1([[maybe_unused]] int&& x) {} + + void f2(__attribute__((unused)) int&& x) {} PiotrZSL wrote: Add info

[clang] [Sema, Lex, Parse] Preprocessor embed in C and C++ (and Obj-C and Obj-C++ by-proxy) (PR #68620)

2023-10-14 Thread via cfe-commits
h-vetinari wrote: OK, I've got a first rebase going. However, because iterating on a diff with 1000s of lines is extremely hard to review and bound to lead to mistakes and iterations (making it harder still to follow what's going on), I've tried to follow a more structured approach. Basically

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/69045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Looks fine, I don't thing that this needs to be configurable. If someone put explicitly attribute, then there is assumption that such param can be unused. https://github.com/llvm/llvm-project/pull/69045

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-14 Thread via cfe-commits
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690 >From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001 From: Reagan Bohan Date: Tue, 10 Oct 2023 11:32:47 + Subject: [PATCH 1/7] [clang] Add /Zc:__STDC__ flag to clang-cl This commit adds the /

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-14 Thread via cfe-commits
https://github.com/xbjfk updated https://github.com/llvm/llvm-project/pull/68690 >From 92899d94e91a6812de8fa5ec7c15c37a81280108 Mon Sep 17 00:00:00 2001 From: Reagan Bohan Date: Tue, 10 Oct 2023 11:32:47 + Subject: [PATCH 1/8] [clang] Add /Zc:__STDC__ flag to clang-cl This commit adds the /

[clang] 769bc11 - [Clang] Implement the 'counted_by' attribute (#68750)

2023-10-14 Thread via cfe-commits
Author: Bill Wendling Date: 2023-10-14T04:18:02-07:00 New Revision: 769bc11f684d376bff03649da41296a4fc710161 URL: https://github.com/llvm/llvm-project/commit/769bc11f684d376bff03649da41296a4fc710161 DIFF: https://github.com/llvm/llvm-project/commit/769bc11f684d376bff03649da41296a4fc710161.diff

[clang] [Clang] Implement the 'counted_by' attribute (PR #68750)

2023-10-14 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/68750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D156784: [AArch64][PAC] Declare FPAC subtarget feature

2023-10-14 Thread Momchil Velikov via Phabricator via cfe-commits
chill added a comment. In D156784#4653741 , @atrosinenko wrote: > As discussed in D156716 , it is not clear > if I have to add FeatureFPAC to every relevant CPU. I would say, yes, it has to be added to each CPU that ha

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-10-14 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp updated https://github.com/llvm/llvm-project/pull/67528 >From 08b5c95bea5b7bfceeae6dfc4deac764faff87a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 27 Sep 2023 08:07:01 + Sub

[clang] e7a6171 - [clang] Enable Wenum-constexpr-conversion also in system headers and … (#67528)

2023-10-14 Thread via cfe-commits
Author: Carlos Galvez Date: 2023-10-14T14:19:20+02:00 New Revision: e7a6171c4c0486aae051543e202d74c04178cfac URL: https://github.com/llvm/llvm-project/commit/e7a6171c4c0486aae051543e202d74c04178cfac DIFF: https://github.com/llvm/llvm-project/commit/e7a6171c4c0486aae051543e202d74c04178cfac.diff

[clang] [clang] Enable Wenum-constexpr-conversion also in system headers and … (PR #67528)

2023-10-14 Thread Carlos Galvez via cfe-commits
Carlos =?utf-8?q?Gálvez?= Message-ID: In-Reply-To: https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/67528 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang] Add /Zc:__STDC__ flag to clang-cl (PR #68690)

2023-10-14 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/68690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __datasizeof (PR #67805)

2023-10-14 Thread via cfe-commits
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/67805 >From e6770ca7735285e1e669032a5a99b07709957803 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Fri, 29 Sep 2023 15:45:56 +0200 Subject: [PATCH] [Clang] Add __datasizeof --- clang/docs/LanguageExtensions

[clang] [Clang] Add __datasizeof (PR #67805)

2023-10-14 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 5e1c2bf3e6fca35ee0445b2a81d47e8576024186 e6770ca7735285e1e669032a5a99b07709957803 --

[clang] [clang-format] Allow default values for template parameters in lambda (PR #69052)

2023-10-14 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/69052 Previously, upon encountering an equals sign while parsing a lambda in the UnwrappedLineParser, it would fall through and fail. This caused any lambda template with a default argument for a template parameter to

[clang] [clang-format] Allow default values for template parameters in lambda (PR #69052)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes Previously, upon encountering an equals sign while parsing a lambda in the UnwrappedLineParser, it would fall through and fail. This caused any lambda template with a default argument for a template par

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread via cfe-commits
https://github.com/AMS21 updated https://github.com/llvm/llvm-project/pull/69045 >From acf77633498bb0f8b67760628f0ac54f772ad1ac Mon Sep 17 00:00:00 2001 From: AMS21 Date: Sat, 14 Oct 2023 10:26:36 +0200 Subject: [PATCH] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread via cfe-commits
AMS21 wrote: Added the suggested change and also added another test case https://github.com/llvm/llvm-project/pull/69045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. https://github.com/llvm/llvm-project/pull/69045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 343bed8 - Canonically identical types are allowed in compound expressions in C

2023-10-14 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2023-10-14T11:03:35-04:00 New Revision: 343bed8d3a9b632594a3f786bbb189613975d51e URL: https://github.com/llvm/llvm-project/commit/343bed8d3a9b632594a3f786bbb189613975d51e DIFF: https://github.com/llvm/llvm-project/commit/343bed8d3a9b632594a3f786bbb189613975d51e.diff

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-10-14 Thread Yurong via Phabricator via cfe-commits
yronglin updated this revision to Diff 557705. yronglin added a comment. Update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153701/new/ https://reviews.llvm.org/D153701 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/ParseDecl.cpp c

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-10-14 Thread Balazs Benics via cfe-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/69057 When doing a base to derived cast, and we should add a cast info recording that fact. This information will be then used for example inside `CXXInstanceCall::getRuntimeDefinition` (CallEvent.cpp), where for vir

[clang] [analyzer] Trust base to derived casts for dynamic types (PR #69057)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balazs Benics (steakhal) Changes When doing a base to derived cast, and we should add a cast info recording that fact. This information will be then used for example inside `CXXInstanceCall::getRuntimeDefinition` (CallEvent.cpp), where fo

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-10-14 Thread via cfe-commits
https://github.com/wheatman created https://github.com/llvm/llvm-project/pull/69061 This is to address https://github.com/llvm/llvm-project/issues/18763 it removes warnings from using a signed char as an array bound if the char is a known positives constant. This goes one step farther than gc

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (wheatman) Changes This is to address https://github.com/llvm/llvm-project/issues/18763 it removes warnings from using a signed char as an array bound if the char is a known positives constant. This goes one step farther than gcc do

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 created https://github.com/llvm/llvm-project/pull/69062 None >From bfeaa2eeaa3d20e1919288bcf1027ec196378236 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Oct 2023 00:20:08 +0800 Subject: [PATCH] [clang-tidy][modernize-loop-convert]check isDependentSi

[PATCH] D153701: [Clang] Implement P2718R0 "Lifetime extension in range-based for loops"

2023-10-14 Thread Yurong via Phabricator via cfe-commits
yronglin marked 2 inline comments as done. yronglin added a comment. @rsmith Thanks a lot for your comments and sorry for the very late reply, I was on vacation some time ago. In D153701#4643609 , @rsmith wrote: > The changes in `SemaInit.cpp` don't loo

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-10-14 Thread via cfe-commits
wheatman wrote: I found the test I would want to modify here (llvm-project/clang/test/Sema/warn-char-subscripts.c) I will work on updating it https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[clang] 80737d2 - [clang][Interp][NFC] Pass PrimType to visitZeroInitializer()

2023-10-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-14T18:43:00+02:00 New Revision: 80737d2ddf05507d96cdd723fb33a6e44ac72a48 URL: https://github.com/llvm/llvm-project/commit/80737d2ddf05507d96cdd723fb33a6e44ac72a48 DIFF: https://github.com/llvm/llvm-project/commit/80737d2ddf05507d96cdd723fb33a6e44ac72a48.diff LO

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-10-14 Thread via cfe-commits
https://github.com/wheatman updated https://github.com/llvm/llvm-project/pull/69061 >From 44e66636bd886b263a15fe9e49d575d8ea53592d Mon Sep 17 00:00:00 2001 From: Brian Wheatman Date: Sat, 14 Oct 2023 12:02:19 -0400 Subject: [PATCH] Remove warnings from -Wchar-subscripts for known positive cons

[clang] Remove warnings from -Wchar-subscripts for known positive constants (PR #69061)

2023-10-14 Thread via cfe-commits
https://github.com/wheatman edited https://github.com/llvm/llvm-project/pull/69061 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Support functional cast in bugprone-dangling-handle (PR #69067)

2023-10-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL created https://github.com/llvm/llvm-project/pull/69067 Add support for constructor conversion based functional cast. Allows to detect issues like: const std::string_view test1 = std::string(a); >From 6d4c7297e19193781d97fe19c3ccf8e65226ad0b Mon Sep 17 00:00:00 2001

[clang-tools-extra] [clang-tidy] Support functional cast in bugprone-dangling-handle (PR #69067)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Piotr Zegar (PiotrZSL) Changes Add support for constructor conversion based functional cast. Allows to detect issues like: const std::string_view test1 = std::string(a); --- Full diff: https://github.com/llvm/llvm-project/pull/69067.

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-14 Thread Piotr Zegar via cfe-commits
@@ -269,6 +269,10 @@ Changes in existing checks ` to support for-loops with iterators initialized by free functions like ``begin``, ``end``, or ``size``. +- Improved :doc:`modernize-loop-convert PiotrZSL wrote: Typo "dor" + leading spaces in second and th

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental created https://github.com/llvm/llvm-project/pull/69072 On Mac M1, if you load something that transitively loads `#include `, it will fail because ``` In file included from <<< inputs >>>:1: In file included from input_line_22:1: In file included from /Applica

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-14 Thread Piotr Zegar via cfe-commits
@@ -939,4 +939,13 @@ void fundamentalTypesTest() { // CHECK-FIXES: for (double Double : Doubles) } +template void test() { + unsigned int test[3][p]; + // Initialize to zero + for (unsigned int i = 0; i < p; ++i) +for (unsigned int j = 0; j < 3; ++j) // CHECK-MESSAGE

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Maksim Levental (makslevental) Changes On Mac M1, if you load something that transitively loads `#include `, it will fail because ``` In file included from <<< inputs >>>:1: In file included from input_line_22:1: In file included fr

[clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-14 Thread via cfe-commits
https://github.com/LYP951018 created https://github.com/llvm/llvm-project/pull/69075 The dependence of a template argument is not only determined by the argument itself, but also by the type of the template parameter: > Furthermore, a non-type > [template-argument](https://eel.is/c++draft/tem

[clang] [clang-format] Allow default values for template parameters in lambda (PR #69052)

2023-10-14 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/69052 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-14 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/69075 From 7a5eef02445d4d1969e5335d0ab7cb5edfb72889 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 8 Oct 2023 00:44:11 +0800 Subject: [PATCH] Fix dependence handling for variable templates --- clang/include/clang

[clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-14 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 8dd3bc18081657fee2352cf5b1c6abacb18fcc84 7a5eef02445d4d1969e5335d0ab7cb5edfb72889 --

[clang] [Clang][Frontend] Fix a crash when -Wdocumentation is used (PR #68525)

2023-10-14 Thread Daniel Höpfl via cfe-commits
dhoepfl wrote: > Since **I'm not an expert in clang AST**, it is hard to reduce the failing > cases. Double so for me. > So the crash is happened because the result of `DeclLocDecomp.second - > CommentEndOffset` is overflowed, so operations over `StringRef Text` is > making the crash. > > *

[clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-14 Thread via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/69075 From e7c7969f69755cff939c88f52987fedcb1ffcd76 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 8 Oct 2023 00:44:11 +0800 Subject: [PATCH] Fix dependence handling for variable templates --- clang/include/clang

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-14 Thread via cfe-commits
https://github.com/LYP951018 edited https://github.com/llvm/llvm-project/pull/69075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix dependence handling of nttp for variable templates (PR #69075)

2023-10-14 Thread via cfe-commits
LYP951018 wrote: @erichkeane @cor3ntin could you review this PR, please? I’m not a collaborator, so I could not add reviewers. https://github.com/llvm/llvm-project/pull/69075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-14 Thread Jonas Hahnfeld via cfe-commits
https://github.com/hahnjo created https://github.com/llvm/llvm-project/pull/69076 Closes https://github.com/llvm/llvm-project/issues/68702 >From d149de4d4e00b63e506441b516f35aeb41786408 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Sat, 14 Oct 2023 20:10:28 +0200 Subject: [PATCH] Fix cra

[clang] Fix crash with modules and constexpr destructor (PR #69076)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jonas Hahnfeld (hahnjo) Changes Closes https://github.com/llvm/llvm-project/issues/68702 --- Full diff: https://github.com/llvm/llvm-project/pull/69076.diff 2 Files Affected: - (modified) clang/lib/AST/ExprConstant.cpp (+7-4) -

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread via cfe-commits
AMS21 wrote: If there are no more problems I would kindly ask for someone to push this on my behalf :) https://github.com/llvm/llvm-project/pull/69045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (PR #69045)

2023-10-14 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL closed https://github.com/llvm/llvm-project/pull/69045 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] bb6a98c - [clang-tidy] Ignore unused parameters in `rvalue-reference-param-not-moved check` (#69045)

2023-10-14 Thread via cfe-commits
Author: AMS21 Date: 2023-10-14T22:51:50+02:00 New Revision: bb6a98c8d2beee78ab9dc1a4c81009410e4911a3 URL: https://github.com/llvm/llvm-project/commit/bb6a98c8d2beee78ab9dc1a4c81009410e4911a3 DIFF: https://github.com/llvm/llvm-project/commit/bb6a98c8d2beee78ab9dc1a4c81009410e4911a3.diff LOG: [c

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-14 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/69078 This adds actual test cases for all the cases that are listed in a code comment in the implementation of this function; having such test coverage eases doing further modifications to the function. From 2b1272

[clang] [clang] [unittest] Add a test for Generic_GCC::GCCVersion::Parse (PR #69078)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Martin Storsjö (mstorsjo) Changes This adds actual test cases for all the cases that are listed in a code comment in the implementation of this function; having such test coverage eases doing further modifications to the function.

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-14 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/69079 In earlier GCC versions, the Debian/Ubuntu provided mingw toolchains were packaged in /usr/lib/gcc/ with version strings such as "5.3-win32", which were matched and found since 6afcd64eb65fca233a7b173f88cffb2c2

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-14 Thread via cfe-commits
Martin =?utf-8?q?Storsjö?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Martin Storsjö (mstorsjo) Changes In earlier GCC versions, the Debian/Ubuntu provided mingw toolchains were packaged in /usr/lib/gcc/ with version strings such as "5.3-

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-14 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This goes on top of #69078 - the first commit is reviewed there, thus within this PR, only review the second commit on its own. https://github.com/llvm/llvm-project/pull/69079 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

[clang] [clang] [Gnu] Improve GCCVersion parsing to match versions such as "10-win32" (PR #69079)

2023-10-14 Thread via cfe-commits
Martin =?utf-8?q?Storsjö?= Message-ID: In-Reply-To: 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 bb6a98c8d2beee78ab9dc1a4c810094

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2023-10-14 Thread via cfe-commits
AMS21 wrote: I think this is a very reasonable change and something I didn't think about when implementing it originally. LGTM :+1: https://github.com/llvm/llvm-project/pull/66810 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[clang-tools-extra] llvm-canon (PR #68176)

2023-10-14 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/17] Add IRCanonicalizer.cpp --- llvm/lib/Transforms/U

[clang-tools-extra] [LLVM] Add Normalizer Pass (PR #68176)

2023-10-14 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli edited https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LLVM] Add Normalizer Pass (PR #68176)

2023-10-14 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli edited https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-10-14 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli edited https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang and LLVM (PR #68656)

2023-10-14 Thread Brad Smith via cfe-commits
brad0 wrote: ping. https://github.com/llvm/llvm-project/pull/68656 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-10-14 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/18] Add IRCanonicalizer.cpp --- llvm/lib/Transforms/U

[clang-tools-extra] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-10-14 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: Renamed to IRNormalizer. Requesting another round of review. https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Vassil Vassilev via cfe-commits
@@ -20,4 +20,6 @@ auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast vgvassilev wrote: Why do we need this? https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Vassil Vassilev via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include vgvassilev w

[clang] Add Documentation for Execution Results Handling in Clang-Repl (PR #65650)

2023-10-14 Thread Vassil Vassilev via cfe-commits
@@ -103,6 +103,13 @@ function (gen_rst_file_from_td output_file td_option source docs_targets) endfunction() if (LLVM_ENABLE_SPHINX) + llvm_find_program(dot) vgvassilev wrote: @Krishna-13-cyber, could we drop the `llvm_find_program(dot)` and rely on handli

[clang] [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang and LLVM (PR #68656)

2023-10-14 Thread Anton Korobeynikov via cfe-commits
@@ -519,6 +519,7 @@ StringRef ARM::computeDefaultTargetABI(const Triple &TT, StringRef CPU) { case Triple::GNUEABIHF: case Triple::MuslEABI: case Triple::MuslEABIHF: + case llvm::Triple::OpenHOS: asl wrote: ```suggestion case Triple::OpenHOS: ``` ht

[clang] [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang and LLVM (PR #68656)

2023-10-14 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/68656 >From bf8c7540cefb423b7a89a938bfb0ad00b0cd555b Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Mon, 9 Oct 2023 22:41:36 -0400 Subject: [PATCH] [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang and LL

[clang] [CUDA][HIP] Fix init var diag in temmplate (PR #69081)

2023-10-14 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/69081 Currently clang diagnoses the following code: (https://godbolt.org/z/s8zK3E5P5) but nvcc does not. ` struct A { constexpr A(){} }; struct B { A a; int b; }; template __global__ void kernel( ) { __sh

[clang] [CUDA][HIP] Fix init var diag in temmplate (PR #69081)

2023-10-14 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Yaxun (Sam) Liu (yxsamliu) Changes Currently clang diagnoses the following code: (https://godbolt.org/z/s8zK3E5P5) but nvcc does not. ` struct A { constexpr A(){} }; struct B { A a; int b; }; template __global__ void

[clang] [Clang][OHOS] Keep ARM ABI selection logic in sync between Clang and LLVM (PR #68656)

2023-10-14 Thread Brad Smith via cfe-commits
@@ -519,6 +519,7 @@ StringRef ARM::computeDefaultTargetABI(const Triple &TT, StringRef CPU) { case Triple::GNUEABIHF: case Triple::MuslEABI: case Triple::MuslEABIHF: + case llvm::Triple::OpenHOS: brad0 wrote: Oops, my bad. That has been corrected. htt

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include makslevental

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -20,4 +20,6 @@ auto r2 = printf("S[f=%f, m=0x%llx]\n", s.f, reinterpret_cast makslevental wrote: This was to test (since `` transitively includes ``). https://github.com/llvm/llvm-project/pull/69072 ___ cfe-commits

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/2] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cp

[clang] [InstCombine] Refactor matchFunnelShift to allow more pattern (NFC) (PR #68474)

2023-10-14 Thread via cfe-commits
@@ -2732,100 +2732,114 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { // rotate matching code under visitSelect and visitTrunc? unsigned Width = Or.getType()->getScalarSizeInBits(); - // First, find an or'd pair of opposite shifts: - //

[clang-tools-extra] [InstCombine] Refactor matchFunnelShift to allow more pattern (NFC) (PR #68474)

2023-10-14 Thread via cfe-commits
@@ -2732,100 +2732,114 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) { // rotate matching code under visitSelect and visitTrunc? unsigned Width = Or.getType()->getScalarSizeInBits(); - // First, find an or'd pair of opposite shifts: - //

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
@@ -248,7 +248,7 @@ Interpreter::~Interpreter() { // can't find the precise resource directory in unittests so we have to hard // code them. const char *const Runtimes = R"( -void* operator new(__SIZE_TYPE__, void* __p) noexcept; +#include makslevental

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/69062 >From bfeaa2eeaa3d20e1919288bcf1027ec196378236 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Sun, 15 Oct 2023 00:20:08 +0800 Subject: [PATCH 1/2] [clang-tidy][modernize-loop-convert]check isDependentSize

[clang-tools-extra] [clang-tidy][modernize-loop-convert]check isDependentSizedArrayType (PR #69062)

2023-10-14 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/69062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2dc6579 - clang: Switch SYCL test to generated checks

2023-10-14 Thread Matt Arsenault via cfe-commits
Author: Matt Arsenault Date: 2023-10-15T11:44:40+09:00 New Revision: 2dc6579f6fb12470559a68886c2a4aecaa8495dd URL: https://github.com/llvm/llvm-project/commit/2dc6579f6fb12470559a68886c2a4aecaa8495dd DIFF: https://github.com/llvm/llvm-project/commit/2dc6579f6fb12470559a68886c2a4aecaa8495dd.diff

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-14 Thread Yeting Kuo via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-14 Thread Craig Topper via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] [clang][repl] fix `new` on Mac M1 (PR #69072)

2023-10-14 Thread Maksim Levental via cfe-commits
https://github.com/makslevental updated https://github.com/llvm/llvm-project/pull/69072 >From d7c57d94d7e75ed1e0df87ebf3c4464e7b951453 Mon Sep 17 00:00:00 2001 From: max Date: Sat, 14 Oct 2023 12:46:42 -0500 Subject: [PATCH 1/3] [clang][repl] fix `new` --- clang/lib/Interpreter/Interpreter.cp

[clang-tools-extra] 0d661e9 - [clangd] Use DenseMap::contains (NFC)

2023-10-14 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2023-10-14T22:11:09-07:00 New Revision: 0d661e965ad1a54e46317f38677bd88875bfcf1d URL: https://github.com/llvm/llvm-project/commit/0d661e965ad1a54e46317f38677bd88875bfcf1d DIFF: https://github.com/llvm/llvm-project/commit/0d661e965ad1a54e46317f38677bd88875bfcf1d.diff L

[clang] 169f60f - [clang][driver] Add avr-libc's default linker script to lld (#68507)

2023-10-14 Thread via cfe-commits
Author: Ben Shi Date: 2023-10-15T13:47:56+08:00 New Revision: 169f60f7c76cb6f7d234ab5dfb2b5e367a35ccbb URL: https://github.com/llvm/llvm-project/commit/169f60f7c76cb6f7d234ab5dfb2b5e367a35ccbb DIFF: https://github.com/llvm/llvm-project/commit/169f60f7c76cb6f7d234ab5dfb2b5e367a35ccbb.diff LOG:

[clang] [clang][driver] Add avr-libc's default linker script to lld (PR #68507)

2023-10-14 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/68507 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3c4ecc4 - [clang][Interp][NFC] Refactor VisitImplicitValueInitExpr

2023-10-14 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2023-10-15T08:52:43+02:00 New Revision: 3c4ecc4628601d07201780ea9ed23770a5a2d86c URL: https://github.com/llvm/llvm-project/commit/3c4ecc4628601d07201780ea9ed23770a5a2d86c DIFF: https://github.com/llvm/llvm-project/commit/3c4ecc4628601d07201780ea9ed23770a5a2d86c.diff LO

  1   2   >