[clang-tools-extra] [clang-tidy] Create bugprone-public-enable-shared-from-this check (PR #102299)

2024-08-08 Thread Nathan James via cfe-commits
njames93 wrote: Actually an ASTVisitor approach could be better here, this way you could create a set of all the `CXXRecordDecls` that publicly inherit from or transitively inherit from `::std::enable_shared_from_this` during traversal https://github.com/llvm/llvm-project/pull/102299 _

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

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

[clang] [C++20] [Moduels] Correct the linkage of const variable in language linkage from module interfaces (PR #102574)

2024-08-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/102574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8410bab - [C++20] [Moduels] Correct the linkage of const variable in language linkage from module interfaces (#102574)

2024-08-08 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-08-09T14:48:56+08:00 New Revision: 8410babc2b69ccb2259e77262ad2baaa17644bea URL: https://github.com/llvm/llvm-project/commit/8410babc2b69ccb2259e77262ad2baaa17644bea DIFF: https://github.com/llvm/llvm-project/commit/8410babc2b69ccb2259e77262ad2baaa17644bea.diff LO

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-08 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: I will take another look tomorrow. https://github.com/llvm/llvm-project/pull/99439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 16dadec - Fix clang flags in the SystemZ zos-mixed-ptr-sizes-malloc.c test

2024-08-08 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-08-09T08:19:49+02:00 New Revision: 16dadecc05fa4986d4522c2c3a09a7628feb0fd4 URL: https://github.com/llvm/llvm-project/commit/16dadecc05fa4986d4522c2c3a09a7628feb0fd4 DIFF: https://github.com/llvm/llvm-project/commit/16dadecc05fa4986d4522c2c3a09a7628feb0fd4.diff LO

[clang] [C++20] [Moduels] Correct the linkage of const variable in language linkage from module interfaces (PR #102574)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/99825 The root cause of the issue is that I didn't realize the things in implicit global module (the language linkage in module interfaces) should b

[clang] [C++20] [Moduels] Correct the linkage of const variable in language linkage from module interfaces (PR #102574)

2024-08-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/102574 Close https://github.com/llvm/llvm-project/issues/99825 The root cause of the issue is that I didn't realize the things in implicit global module (the language linkage in module interfaces) should be conside

[clang] [llvm] [Sanitizer] Make sanitizer passes idempotent (PR #99439)

2024-08-08 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > > @vitalybuka @nikic Let me know if anything needs to be changed in this PR? > > Else, will merge the PR after approval. > > Please review. you should click "re-request review" button next to review. https://github.com/llvm/llvm-project/pull/99439 _

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

2024-08-08 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] [clang][ASTMatcher] Add matches for StringLiteral which matches lite

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-08 Thread Anton Korobeynikov via cfe-commits
@@ -956,6 +956,25 @@ def err_ptrauth_indirect_goto_addrlabel_arithmetic : Error< "%select{subtraction|addition}0 of address-of-label expressions is not " "supported with ptrauth indirect gotos">; +// __ptrauth qualifier +def err_ptrauth_qualifier_invalid : Error< + "%sele

[clang] [PAC] Add support for __ptrauth type qualifier (PR #100830)

2024-08-08 Thread Anton Korobeynikov via cfe-commits
@@ -1758,6 +1758,34 @@ Also see the documentation for `@available }]; } +def PtrAuthDocs : Documentation { + let Category = DocCatVariable; + let Heading = "__ptrauth, __ptrauth_restricted_intptr"; asl wrote: `__ptrauth_restricted_intptr` is not here yet.

[clang] [Doc] [C++20] [Modules] Clarify the reachability of internal partition units (PR #102572)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules @llvm/pr-subscribers-clang Author: Chuanqi Xu (ChuanqiXu9) Changes Motivated by https://github.com/llvm/llvm-project/issues/101348 Although I don't want the tool's doc to explain the standard's wording, the wording itself has some unspeci

[clang] [Doc] [C++20] [Modules] Clarify the reachability of internal partition units (PR #102572)

2024-08-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/102572 Motivated by https://github.com/llvm/llvm-project/issues/101348 Although I don't want the tool's doc to explain the standard's wording, the wording itself has some unspecified thing. So I feel it will be hel

[clang] Add flag to suppress overflow errors in C++ constant expressions. (PR #102390)

2024-08-08 Thread Mike Hommey via cfe-commits
glandium wrote: > and the fix is already applied from looking at > https://android.googlesource.com/platform/frameworks/native/+/master/libs/nativewindow/include/android/hardware_buffer.h#329 it's not part of any released NDK, and it's common to be stuck with older NDKs. Most people are probab

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

2024-08-08 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From 0d8191b5d205c811364cf1f1b184bcbc9bbeda7f 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] [C++20] [Modules] Emit Errors when compiling a non-module source as module (PR #102565)

2024-08-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/102565 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] be66c50 - [C++20] [Modules] Emit Errors when compiling a non-module source as module (#102565)

2024-08-08 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-08-09T13:39:24+08:00 New Revision: be66c506c7fd6fdb7363f724075d02ca0d35713a URL: https://github.com/llvm/llvm-project/commit/be66c506c7fd6fdb7363f724075d02ca0d35713a DIFF: https://github.com/llvm/llvm-project/commit/be66c506c7fd6fdb7363f724075d02ca0d35713a.diff LO

[clang] [hmaptool] Fix for empty prefixes and suffixes (PR #102571)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shoaib Meenai (smeenai) Changes The previous logic could fail in some edge cases. --- Full diff: https://github.com/llvm/llvm-project/pull/102571.diff 1 Files Affected: - (modified) clang/utils/hmaptool/hmaptool (+5-2) ``dif

[clang] [hmaptool] Fix for empty prefixes and suffixes (PR #102571)

2024-08-08 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai created https://github.com/llvm/llvm-project/pull/102571 The previous logic could fail in some edge cases. >From 28297fc4e0b3b21990f1d614115b8eb946989479 Mon Sep 17 00:00:00 2001 From: Shoaib Meenai Date: Wed, 13 Dec 2023 18:59:25 -0800 Subject: [PATCH] [hmaptool] F

[clang] [RFC] Add clang atomic control options and pragmas (PR #102569)

2024-08-08 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu edited https://github.com/llvm/llvm-project/pull/102569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [RFC] Add clang atomic control options and pragmas (PR #102569)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Yaxun (Sam) Liu (yxsamliu) Changes This RFC proposes the addition of an atomic pragma to Clang, designed to provide a more flexible mechanism for users to specify how atomic operations should be handled during the lowering proces

[clang] [RFC] Add clang atomic control options and pragmas (PR #102569)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yaxun (Sam) Liu (yxsamliu) Changes This RFC proposes the addition of an atomic pragma to Clang, designed to provide a more flexible mechanism for users to specify how atomic operations should be handled during the lowering process

[clang] [RFC] Add clang atomic control options and pragmas (PR #102569)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-coroutines Author: Yaxun (Sam) Liu (yxsamliu) Changes This RFC proposes the addition of an atomic pragma to Clang, designed to provide a more flexible mechanism for users to specify how atomic operations should be handled duri

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder edited https://github.com/llvm/llvm-project/pull/102567 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder updated https://github.com/llvm/llvm-project/pull/102567 >From 4bc7053e1383e6aa9e1a60017be296e305b8da5a Mon Sep 17 00:00:00 2001 From: Ian Anderson Date: Thu, 8 Aug 2024 21:54:40 -0700 Subject: [PATCH] Fix a unit test input file I forgot to update the versi

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Ian Anderson (ian-twilightcoder) Changes I forgot to update the version info in the SDKSettings file when I updated it to the real version relevant to the test. The version in the SDKSettings file isn't actually used for anything i

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ian Anderson (ian-twilightcoder) Changes I forgot to update the version info in the SDKSettings file when I updated it to the real version relevant to the test. The version in the SDKSettings file isn't actually used for anything in the t

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

2024-08-08 Thread via cfe-commits
Author: akshaykumars614 Date: 2024-08-09T00:55:15-04:00 New Revision: 5297b750e54dafe16cc13f24b8d5478214e83682 URL: https://github.com/llvm/llvm-project/commit/5297b750e54dafe16cc13f24b8d5478214e83682 DIFF: https://github.com/llvm/llvm-project/commit/5297b750e54dafe16cc13f24b8d5478214e83682.dif

[clang] Fix a unit test input file (PR #102567)

2024-08-08 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/102567 I forgot to update the version info in the SDKSettings file when I updated it to the real version relevant to the test. The version in the SDKSettings file isn't actually used for anything in the test

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

2024-08-08 Thread via cfe-commits
https://github.com/akshaykumars614 closed https://github.com/llvm/llvm-project/pull/100177 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Kees Cook via cfe-commits
kees wrote: > > I'd expect some kind of diagnostic when the specified field doesn't have a > > corresponding counted_by field. > > So there's a complication with that. The use case for this builtin is to > automatically set the `count` field during allocation in the Linux kernel. > (It could

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

2024-08-08 Thread via cfe-commits
https://github.com/Gitspike updated https://github.com/llvm/llvm-project/pull/102152 >From ff2e7f928b7f29a89de20aeb0df2e718a5290759 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][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

2024-08-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky closed https://github.com/llvm/llvm-project/pull/102554 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

2024-08-08 Thread Qizhi Hu via cfe-commits
@@ -951,7 +951,8 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( DeclInfo.getDecl(), DeclInfo.getLexicalDeclContext(), /*Final=*/false, /*Innermost=*/std::nullopt, /*RelativeToPrimary=*/true, - /*Pattern=*/nullptr, /*ForConstrain

[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

2024-08-08 Thread Qizhi Hu via cfe-commits
jcsxky wrote: > I'm sorry but this approach doesn't make sense to me. > > I have to say that I self-assigned the issue hours before this patch (I don't > know when you started working on it because you haven't explained anything > either), and that means I'll look into that recently since I've

[clang] [C++20] [Modules] Emit Errors when compiling a non-module source as module (PR #102565)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes Close https://github.com/llvm/llvm-project/issues/101398 The root cause of the issue is that I removed the codes before and failed to recognize it in time and this was not found for a long time due

[clang] [C++20] [Modules] Emit Errors when compiling a non-module source as module (PR #102565)

2024-08-08 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/102565 Close https://github.com/llvm/llvm-project/issues/101398 The root cause of the issue is that I removed the codes before and failed to recognize it in time and this was not found for a long time due to it onl

[clang] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

2024-08-08 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > The description specifies "Reverted due to both regression reported on PR and > https://github.com/llvm/llvm-project/issues/102353"; but somehow the commit > message does not include the reason. > > (I just tried to look at reverts without reasons and remind the authors.) I

[clang] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

2024-08-08 Thread Fangrui Song via cfe-commits
MaskRay wrote: The description specifies "Reverted due to both regression reported on PR and https://github.com/llvm/llvm-project/issues/102353"; but somehow the commit message does not include the reason. (I just tried to look at reverts without reasons and remind the authors.) https://github

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
yronglin wrote: > LGTM otherwise. The CI currently fails on Windows, but that looks like it's > using an old version of the test? Thanks! Some local changes were missed last time and were not committed. https://github.com/llvm/llvm-project/pull/102170 __

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

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

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
@@ -46,7 +46,7 @@ constexpr int div(int a, int b) { return a / b; // both-note {{division by zero}} }; - return f(); // expected-note {{in call to '&f->operator()()'}} \ + return f(); // expected-note {{in call to 'f.operator()()'}} \ yronglin wrote:

[clang] [Clang][Interp] Fix display of syntactically-invalid note for member function calls (PR #102170)

2024-08-08 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/102170 >From f14464c0734776cd79a2fbd93cec94e815276009 Mon Sep 17 00:00:00 2001 From: yronglin Date: Fri, 9 Aug 2024 01:22:29 +0800 Subject: [PATCH 1/2] [Clang][Interp] Fix display of syntactically-invalid note for me

[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

2024-08-08 Thread Younan Zhang via cfe-commits
@@ -951,7 +951,8 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( DeclInfo.getDecl(), DeclInfo.getLexicalDeclContext(), /*Final=*/false, /*Innermost=*/std::nullopt, /*RelativeToPrimary=*/true, - /*Pattern=*/nullptr, /*ForConstrain

[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

2024-08-08 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 requested changes to this pull request. I'm sorry but this approach doesn't make sense to me. I have to say that I self-assigned the issue hours before this patch (I don't know when you started working on it because you haven't explained anything either), and that me

[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

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

[clang] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

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

[clang] 00139ae - Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (#102551)

2024-08-08 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-08-08T23:38:08-03:00 New Revision: 00139ae1bc0ae855ebe9c8991f480b382bbc4308 URL: https://github.com/llvm/llvm-project/commit/00139ae1bc0ae855ebe9c8991f480b382bbc4308 DIFF: https://github.com/llvm/llvm-project/commit/00139ae1bc0ae855ebe9c8991f480b382bbc4308.dif

[clang] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

2024-08-08 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > (It's #102353) Updated, thanks for the correction. https://github.com/llvm/llvm-project/pull/102551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

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

[clang] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

2024-08-08 Thread Younan Zhang via cfe-commits
zyn0217 wrote: (It's #102353) https://github.com/llvm/llvm-project/pull/102551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

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

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: /cherry-pick 847f9cb0e868c8ec34f9aa86fdf846f8c4e0388b https://github.com/llvm/llvm-project/pull/102287 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland [C++20] [Modules] [Itanium ABI] Generate the vtable in the mod… (PR #102287)

2024-08-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Although there is an issue report in https://github.com/llvm/llvm-project/issues/98021. But it looks like an existing issue and the previous "fix" is just a "coincidence". So I don't think this is a regression and I like to backport this. https://github.com/llvm/llvm-project

[clang] [clang-tools-extra] [lldb] [clang] Reland: Instantiate alias templates with sugar (PR #101858)

2024-08-08 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > or if we would implement a `TypeAliasTemplateSpecializationDecl` only for the > benefit of external resugarers. It is not only valuable to external resugarers. Another point that warrants an introduction of it is for unevaluated lambdas. These lambdas e.g. appearing as part o

[clang] [llvm] [IR] Add method to GlobalVariable to change type of initializer. (PR #102553)

2024-08-08 Thread John McCall via cfe-commits
https://github.com/rjmccall approved this pull request. Well, this is wonderful, thank you. LGTM. https://github.com/llvm/llvm-project/pull/102553 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > FWIW, on one of my test systems that's currently very busy, check-offload > consistently fails with amdgpu-arch timeouts. However, the following so far > makes it consistently succeed: > > ``` > $ CLANG_TOOLCHAIN_PROGRAM_TIMEOUT=60 ninja check-offload > ``` > > Previously, I'

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

2024-08-08 Thread Justin Stitt via cfe-commits
JustinStitt wrote: @bwendling I tried to address all your feedback points with 4b3efbb41ff86eeff15671b1d876e1ef6a58a536 Let me know how that looks 👍 https://github.com/llvm/llvm-project/pull/100272 ___ cfe-commits mailing list cfe-commits@lists.llvm.

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

2024-08-08 Thread Justin Stitt via cfe-commits
@@ -2877,6 +2888,17 @@ ScalarExprEmitter::EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, } else if (type->isIntegerType()) { QualType promotedType; bool canPerformLossyDemotionCheck = false; + +// Is the pattern "while (i--)" and overflow exclusion? +

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

2024-08-08 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,40 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

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

2024-08-08 Thread Justin Stitt via cfe-commits
@@ -555,6 +570,11 @@ class LangOptions : public LangOptionsBase { /// The default stream kind used for HIP kernel launching. GPUDefaultStreamKind GPUDefaultStream; + /// Which overflow patterns should be excluded from sanitizer instrumentation + int OverflowPatternExclus

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

2024-08-08 Thread Justin Stitt via cfe-commits
@@ -293,6 +293,40 @@ To silence reports from unsigned integer overflow, you can set ``-fsanitize-recover=unsigned-integer-overflow``, is particularly useful for providing fuzzing signal without blowing up logs. +Disabling instrumentation for common overflow patterns +

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

2024-08-08 Thread Justin Stitt via cfe-commits
@@ -0,0 +1,83 @@ +// Check for potential false positives from patterns that _almost_ match classic overflow-dependent or overflow-prone code patterns JustinStitt wrote: resolved in 4b3efbb41ff86eeff15671b1d876e1ef6a58a536 https://github.com/llvm/llvm-project/pu

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

2024-08-08 Thread Justin Stitt via cfe-commits
@@ -4248,6 +4248,22 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << Val; } + if (auto *A = Args.getLastArg(OPT_fsanitize_overflow_pattern_exclusion_EQ)) { +for (int i

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

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

[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qizhi Hu (jcsxky) Changes Skip adding template instantiation arguments when the declaration is a nested class template when instantiating constraint expression. attempt to fix https://github.com/llvm/llvm-project/issues/102320 --- Full di

[clang] [Clang][Sema] Fix mismatch of out-of-line definition of template class (PR #102554)

2024-08-08 Thread Qizhi Hu via cfe-commits
https://github.com/jcsxky created https://github.com/llvm/llvm-project/pull/102554 Skip adding template instantiation arguments when the declaration is a nested class template when instantiating constraint expression. attempt to fix https://github.com/llvm/llvm-project/issues/102320 >From 0080

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joel E. Denny via cfe-commits
jdenny-ornl wrote: FWIW, on one of my test systems that's currently very busy, check-offload consistently fails with amdgpu-arch timeouts. However, the following so far makes it consistently succeed: ``` $ CLANG_TOOLCHAIN_PROGRAM_TIMEOUT=60 ninja check-offload ``` Previously, I've decreased

[clang] [llvm] [IR] Add method to GlobalVariable to change type of initializer. (PR #102553)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Eli Friedman (efriedma-quic) Changes With opaque pointers, nothing directly uses the value type, so we can mutate it if we want. This avoid doing a complicated RAUW dance. --- Full diff: https://github.com/llvm/llvm-project/pull/102553

[clang] [llvm] [IR] Add method to GlobalVariable to change type of initializer. (PR #102553)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eli Friedman (efriedma-quic) Changes With opaque pointers, nothing directly uses the value type, so we can mutate it if we want. This avoid doing a complicated RAUW dance. --- Full diff: https://github.com/llvm/llvm-project/pull/102553.d

[clang] [llvm] [IR] Add method to GlobalVariable to change type of initializer. (PR #102553)

2024-08-08 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic created https://github.com/llvm/llvm-project/pull/102553 With opaque pointers, nothing directly uses the value type, so we can mutate it if we want. This avoid doing a complicated RAUW dance. >From f3151c0b623881ca29d4c965f93cf5aa0714d32e Mon Sep 17 00:00:00 2

[clang] [clang][DebugInfo] Don't mark structured bindings as artificial (PR #100355)

2024-08-08 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/100355 >From 2b1255de05856e4c79f58d3e4071384ba80a881d Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 18 Jul 2024 16:26:16 -0500 Subject: [PATCH 1/3] [clang][Sema] Don't mark VarDecls of bindings in tuple-li

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/102549 >From 7ba43ae2b737fbd868848a23b58b3965f8d36ce1 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 6 Aug 2024 17:49:01 -0700 Subject: [PATCH 1/9] [WIP][Clang] Add __builtin_get_counted_by builtin The __bu

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Bill Wendling via cfe-commits
bwendling wrote: > I'd expect some kind of diagnostic when the specified field doesn't have a > corresponding counted_by field. So there's a complication with that. The use case for this builtin is to automatically set the `count` field during allocation in the Linux kernel. (It could be used

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 reopened https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] C++20 Coroutines: Introduce Frontend Attribute [[clang::coro_await_elidable]] (PR #99282)

2024-08-08 Thread Yuxuan Chen via cfe-commits
https://github.com/yuxuanchen1997 closed https://github.com/llvm/llvm-project/pull/99282 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PAC][AArch64] Support init/fini array signing (PR #96478)

2024-08-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: There's some followup discussion suggesting a different IR representation at https://github.com/llvm/llvm-project/pull/102199#discussion_r1706094411 . https://github.com/llvm/llvm-project/pull/96478 ___ cfe-commits mailing list

[clang] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

2024-08-08 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov updated https://github.com/llvm/llvm-project/pull/102551 >From c70e98cef58982fd7afb896fe08ebacc8b752009 Mon Sep 17 00:00:00 2001 From: Matheus Izvekov Date: Thu, 8 Aug 2024 20:18:01 -0300 Subject: [PATCH] Revert "[clang] Reland: Instantiate concepts with sugared tem

[clang] [llvm] Revert "demangle function names in trace files (#87626)" (PR #102274)

2024-08-08 Thread Fangrui Song via cfe-commits
MaskRay wrote: > @tru @nikic @MaskRay should this be backported to 19 release branch? Thanks for asking:) I think so. Invoked the cherry-pick command at https://github.com/llvm/llvm-project/issues/10#issuecomment-2276883290 https://github.com/llvm/llvm-project/pull/102274 _

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joel E. Denny via cfe-commits
https://github.com/jdenny-ornl updated https://github.com/llvm/llvm-project/pull/102521 >From 6546428805b52f1b6f350193ab08ff027892710f Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Thu, 8 Aug 2024 15:02:04 -0400 Subject: [PATCH 1/5] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I'd expect some kind of diagnostic when the specified field doesn't have a corresponding counted_by field. https://github.com/llvm/llvm-project/pull/102549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-08 Thread Fangrui Song via cfe-commits
MaskRay wrote: Conventionally, `.debug_*` sections are reserved for DWARF, even without official standards. GNU strip's default behavior --strip-all, emulated by llvm-objcopy's --strip-all-gnu option, is roughly to remove non-SHF_ALLOC sections that are not debug. The `.llvm` prefix holds no s

[clang] [llvm] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)

2024-08-08 Thread Shilei Tian via cfe-commits
shiltian wrote: This PR is no longer needed. We decided to move the `AMDGPUAttributorPass` to full LTO. https://github.com/llvm/llvm-project/pull/100953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [llvm] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)

2024-08-08 Thread Shilei Tian via cfe-commits
https://github.com/shiltian closed https://github.com/llvm/llvm-project/pull/100953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/102549 >From 7ba43ae2b737fbd868848a23b58b3965f8d36ce1 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Tue, 6 Aug 2024 17:49:01 -0700 Subject: [PATCH 1/8] [WIP][Clang] Add __builtin_get_counted_by builtin The __bu

[clang] [libcxx] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This reverts commit 748371183ae769bfb485f1e7466a864bf1db93d5. Reverted due to both regression reported on PR and #102253 --- Patch is 30.61 KiB, truncated to 20.00 KiB below, full version: https://gith

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 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 bb7143f6669345825c214b26fbe336857f4bf523 197cd1c945c4b1c5cdd38d07f6ed5dd2baa96ab2 --e

[clang] [libcxx] Revert "[clang] Reland: Instantiate concepts with sugared template arguments (#101782)" (PR #102551)

2024-08-08 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/102551 This reverts commit 748371183ae769bfb485f1e7466a864bf1db93d5. Reverted due to both regression reported on PR and #102253 >From cce965741a7496f792e3f94f47ae5acba06c4c39 Mon Sep 17 00:00:00 2001 From: Matheus Iz

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Bill Wendling via cfe-commits
bwendling wrote: There's still some cleanup to do. Firstly, the code to get the `MemberExpr` for the flexible array member. It's sloppy. https://github.com/llvm/llvm-project/pull/102549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://l

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM Discourse](https://discourse.llvm.org/t/hidden-email

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Bill Wendling via cfe-commits
bwendling wrote: @kees https://github.com/llvm/llvm-project/pull/102549 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Bill Wendling (bwendling) Changes The __builtin_get_counted_by builtin is used on a flexible array pointer and returns a pointer to the "counted_by" attribute's COUNT argument, which is a field in the same non-anonymous struct as the flexib

[clang] [WIP][Clang] Add __builtin_get_counted_by builtin (PR #102549)

2024-08-08 Thread Bill Wendling via cfe-commits
https://github.com/bwendling created https://github.com/llvm/llvm-project/pull/102549 The __builtin_get_counted_by builtin is used on a flexible array pointer and returns a pointer to the "counted_by" attribute's COUNT argument, which is a field in the same non-anonymous struct as the flexible a

[clang] [attributes][-Wunsafe-buffer-usage] Support adding unsafe_buffer_usage attribute to struct fields (PR #101585)

2024-08-08 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/101585 >From 1ecd91c03f6de92153809402b10f99e5f649787f Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Thu, 1 Aug 2024 11:01:36 -0700 Subject: [PATCH 1/4] [-Wunsafe-buffer-usage] Support adding unsafe_buffer_u

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joel E. Denny via cfe-commits
@@ -116,6 +117,15 @@ ToolChain::executeToolChainProgram(StringRef Executable, }; std::string ErrorMessage; + int SecondsToWait = DefaultSecondsToWait; + if (std::optional Str = + llvm::sys::Process::GetEnv("CLANG_TOOL_CHAIN_PROGRAM_WAIT")) { +int Val = std::

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joel E. Denny via cfe-commits
@@ -99,7 +99,8 @@ def warn_drv_amdgpu_cov6: Warning< " use at your own risk">; def err_drv_undetermined_gpu_arch : Error< "cannot determine %0 architecture: %1; consider passing it via " - "'%2'">; + "'%2' or increasing the tool timeout using the environment variable " +

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. https://github.com/llvm/llvm-project/pull/102521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joel E. Denny via cfe-commits
https://github.com/jdenny-ornl updated https://github.com/llvm/llvm-project/pull/102521 >From 6546428805b52f1b6f350193ab08ff027892710f Mon Sep 17 00:00:00 2001 From: "Joel E. Denny" Date: Thu, 8 Aug 2024 15:02:04 -0400 Subject: [PATCH 1/4] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout

[clang] [llvm] [Clang] Add env var for nvptx-arch/amdgpu-arch timeout (PR #102521)

2024-08-08 Thread Joel E. Denny via cfe-commits
https://github.com/jdenny-ornl edited https://github.com/llvm/llvm-project/pull/102521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >