[clang] [Clang][ExprConstant] fix constant expression did not evaluate to integer (PR #97146)

2024-07-06 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght updated https://github.com/llvm/llvm-project/pull/97146 >From 7e14846e93df9f86b994c526b0da1f729c9b7cd4 Mon Sep 17 00:00:00 2001 From: Backl1ght Date: Sat, 29 Jun 2024 15:26:21 +0800 Subject: [PATCH 1/2] fix --- clang/docs/ReleaseNotes.rst | 1 + clang/lib

[clang-tools-extra] [llvm] [clang-doc] fix bug introduced by asset test (PR #97540)

2024-07-06 Thread Michał Górny via cfe-commits
mgorny wrote: This change broke standalone clang builds against installed LLVM, since `LLVM_SHARE_OUTPUT_INTDIR` is not exported by LLVM and therefore resolves to an empty path: ``` ninja: error: mkdir(/clang-doc): Permission denied ninja: build stopped: . ``` Why are you even declaring the d

[clang] [Clang][ExprConstant] fix constant expression did not evaluate to integer (PR #97146)

2024-07-06 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght updated https://github.com/llvm/llvm-project/pull/97146 >From 804c18269ab0c8018834a89f286e05c7e479ed42 Mon Sep 17 00:00:00 2001 From: Backl1ght Date: Sat, 29 Jun 2024 15:26:21 +0800 Subject: [PATCH 1/2] fix --- clang/docs/ReleaseNotes.rst | 1 + clang/lib

[clang] 874ca08 - [Clang][ExprConstant] fix constant expression did not evaluate to integer (#97146)

2024-07-06 Thread via cfe-commits
Author: Zhikai Zeng Date: 2024-07-06T16:28:23+08:00 New Revision: 874ca08645420413e525054a47caf039bebde28b URL: https://github.com/llvm/llvm-project/commit/874ca08645420413e525054a47caf039bebde28b DIFF: https://github.com/llvm/llvm-project/commit/874ca08645420413e525054a47caf039bebde28b.diff L

[clang] [Clang][ExprConstant] fix constant expression did not evaluate to integer (PR #97146)

2024-07-06 Thread Zhikai Zeng via cfe-commits
https://github.com/Backl1ght closed https://github.com/llvm/llvm-project/pull/97146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-doc] revert asset bug fix (PR #97882)

2024-07-06 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/97882 reverts https://github.com/llvm/llvm-project/pull/97540 which broke clangs standalone build >From 361e3e379df2f292d1099f48e9479742c727572f Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Sat, 6 Jul 2024 04:

[clang-tools-extra] [llvm] [clang-doc] revert asset bug fix (PR #97882)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes reverts https://github.com/llvm/llvm-project/pull/97540 which broke clangs standalone build --- Full diff: https://github.com/llvm/llvm-project/pull/97882.diff 2 Files Affected: - (modified) clang

[clang-tools-extra] ac9d34a - [clang-doc] revert asset bug fix (#97882)

2024-07-06 Thread via cfe-commits
Author: PeterChou1 Date: 2024-07-06T04:29:49-04:00 New Revision: ac9d34a2eed4c4d58edf25b92e397faa76170d00 URL: https://github.com/llvm/llvm-project/commit/ac9d34a2eed4c4d58edf25b92e397faa76170d00 DIFF: https://github.com/llvm/llvm-project/commit/ac9d34a2eed4c4d58edf25b92e397faa76170d00.diff LO

[clang-tools-extra] [llvm] [clang-doc] revert asset bug fix (PR #97882)

2024-07-06 Thread via cfe-commits
https://github.com/PeterChou1 closed https://github.com/llvm/llvm-project/pull/97882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-doc] revert asset bug fix (PR #97882)

2024-07-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `bolt-x86_64-ubuntu-dylib` running on `bolt-worker` while building `clang-tools-extra,llvm` at step 6 "test-build-bolt-check-bolt". Full details are available at: https://lab.llvm.org/buildbot/#/builders/119/builds/844 Here i

[clang-tools-extra] [llvm] [clang-doc] revert asset bug fix (PR #97882)

2024-07-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-ubuntu` running on `linaro-lldb-aarch64-ubuntu` while building `clang-tools-extra,llvm` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/59/builds/1130 Here is the releva

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-06 Thread via cfe-commits
https://github.com/NimishMishra updated https://github.com/llvm/llvm-project/pull/92364 >From 6423811853ab17f7109a4de972b66ce37573e979 Mon Sep 17 00:00:00 2001 From: Nimish Mishra Date: Sat, 6 Jul 2024 15:14:32 +0530 Subject: [PATCH] [clang][flang][OpenMPIRBuilder] Emit __atomic_load and __ato

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-06 Thread via cfe-commits
https://github.com/NimishMishra edited https://github.com/llvm/llvm-project/pull/92364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [OpenMPIRBuilder] Emit __atomic_load and __atomic_compare_exchange libcalls for complex types in atomic update (PR #92364)

2024-07-06 Thread via cfe-commits
https://github.com/NimishMishra edited https://github.com/llvm/llvm-project/pull/92364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [clang-doc] revert asset bug fix (PR #97882)

2024-07-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-aarch64-windows` running on `linaro-armv8-windows-msvc-05` while building `clang-tools-extra,llvm` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/141/builds/555 Here is the rel

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91990 >From 5dc9193af0d98335a87e93ad70d945dbc0ffce79 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 13 May 2024 16:59:06 +0100 Subject: [PATCH 1/4] [Clang] Fix Microsoft ABI inheritance model when member poi

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/91990 >From 5dc9193af0d98335a87e93ad70d945dbc0ffce79 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 13 May 2024 16:59:06 +0100 Subject: [PATCH 1/5] [Clang] Fix Microsoft ABI inheritance model when member poi

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-06 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/97806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-06 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang-tools-extra] Allow unnecessary-value-param to match templated functions including lambdas with auto. (PR #97767)

2024-07-06 Thread Vitaly Goldshteyn via cfe-commits
@@ -0,0 +1,93 @@ +// RUN: %check_clang_tidy -std=c++14-or-later %s performance-unnecessary-value-param %t + +struct ExpensiveToCopyType { + virtual ~ExpensiveToCopyType(); +}; + +template void templateWithNonTemplatizedParameter(const ExpensiveToCopyType S, T V) { + // CHECK

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll commented: `Sema.h` changes look good. https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH 1/3] [clang] Add C++26 diagnostics to compatibility diagnosic

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll updated https://github.com/llvm/llvm-project/pull/97806 >From b855fe1b301a156ea45caa4b6fd6eca1c69d5cf5 Mon Sep 17 00:00:00 2001 From: Vlad Serebrennikov Date: Fri, 5 Jul 2024 12:39:13 +0300 Subject: [PATCH 1/4] [clang] Add C++26 diagnostics to compatibility diagnosic

[clang] [Clang] Fix Microsoft ABI inheritance model when member pointer is used in a base specifier (PR #91990)

2024-07-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok edited https://github.com/llvm/llvm-project/pull/91990 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Yupei Liu via cfe-commits
https://github.com/LYP951018 edited https://github.com/llvm/llvm-project/pull/97215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

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

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks! I think the approach makes sense. Just some nits from me @cor3ntin do you have any other comments? I think you can do the last approval. :) https://github.com/llvm/llvm-project/pull/97215 ___ cfe-commits m

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Younan Zhang via cfe-commits
zyn0217 wrote: Oh, I forgot it: this also needs a release note. https://github.com/llvm/llvm-project/pull/97215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] be3a8b8 - [clang] Add C++26 diagnostics to compatibility diagnosic groups (#97806)

2024-07-06 Thread via cfe-commits
Author: Vlad Serebrennikov Date: 2024-07-06T15:52:19+04:00 New Revision: be3a8b8d94608746b22cb0cf3fc03af33b7d8648 URL: https://github.com/llvm/llvm-project/commit/be3a8b8d94608746b22cb0cf3fc03af33b7d8648 DIFF: https://github.com/llvm/llvm-project/commit/be3a8b8d94608746b22cb0cf3fc03af33b7d8648.

[clang] [clang] Add C++26 diagnostics to compatibility diagnosic groups (PR #97806)

2024-07-06 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/97806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Enable aarch64-amazon-linux triple (PR #82232)

2024-07-06 Thread Byoungchan Lee via cfe-commits
bc-lee wrote: I'm not the owner of this code, but I just dropped by to say that I don't think this patch will be accepted. A few lines above your changes, there is a comment that says, "Please don't add more elements to *Triples.". @MaskRay is working to reduce the number of target triples like

[clang] Reapply "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002) (PR #97894)

2024-07-06 Thread Nikolas Klauser via cfe-commits
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/97894 This reverts commit 567b2c608c307c097315dd5ec4d6a5bbcddf898d. >From 43b1972a867bf9fa16fdf0d93dcbca4deae9fd13 Mon Sep 17 00:00:00 2001 From: Nikolas Klauser Date: Sat, 29 Jun 2024 21:51:02 +0200 Subject: [PAT

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-06 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. One nit, otherwise LGTM. Regarding the issue of attaching the constraint to a non-template function, pragmatically, this is just something internal to compiler, and we're still conforming to the standard in terms of the user's codes. So, i

[clang] Reapply "[Clang] Fix __is_trivially_equality_comparable returning true with ineligebile defaulted overloads" (#97002) (PR #97894)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Nikolas Klauser (philnik777) Changes This reverts commit 567b2c608c307c097315dd5ec4d6a5bbcddf898d. --- Full diff: https://github.com/llvm/llvm-project/pull/97894.diff 5 Files Affected: - (modified) clang/docs/ReleaseNotes.rst (+4-1) -

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

2024-07-06 Thread Younan Zhang via cfe-commits
@@ -3216,6 +3226,44 @@ void DeclareImplicitDeductionGuidesForTypeAlias( Guides.suppressDiagnostics(); for (auto *G : Guides) { +if (auto *DG = dyn_cast(G)) { + // The deduction guide is a non-template function decl, we just clone it. + auto *FunctionType = +

[clang] [clang] CTAD: Generate deduction guides for alias templates from non-template explicit deduction guides (PR #96686)

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

[clang] [Clang] Simplify release notes and remove irrelevant comment (PR #96407)

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/96407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Sema] Fix crash in Sema::FindInstantiatedDecl (PR #96509)

2024-07-06 Thread via cfe-commits
Alejandro =?utf-8?q?=C3=81lvarez_Ayll=C3=B3n?= Message-ID: In-Reply-To: cor3ntin wrote: Thanks for the fix; I think this makes sense. Can you provide a release note? https://github.com/llvm/llvm-project/pull/96509 ___ cfe-commits mailing list cfe-co

[clang] de88b2c - [Clang] Simplify release notes and remove irrelevant comment (#96407)

2024-07-06 Thread via cfe-commits
Author: Gábor Spaits Date: 2024-07-06T15:22:51+02:00 New Revision: de88b2cb16af4bba659d0bb2ddf10bda681ec84d URL: https://github.com/llvm/llvm-project/commit/de88b2cb16af4bba659d0bb2ddf10bda681ec84d DIFF: https://github.com/llvm/llvm-project/commit/de88b2cb16af4bba659d0bb2ddf10bda681ec84d.diff

[clang] [Clang] Simplify release notes and remove irrelevant comment (PR #96407)

2024-07-06 Thread Gábor Spaits via cfe-commits
https://github.com/spaits closed https://github.com/llvm/llvm-project/pull/96407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread via cfe-commits
@@ -60,3 +60,26 @@ template C1>> auto t3() { template C1>> auto t3(); static_assert(is_same()), X>>>); #endif + +namespace GH95735 { + +int g(int fn) { + return [f = fn](auto tpl) noexcept(noexcept(f)) { return f; }(0); +} + +int foo(auto... fn) { + // FIXME: This one hits th

[clang] [Clang] Simplify release notes and remove irrelevant comment (PR #96407)

2024-07-06 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-ppc64le-linux` running on `ppc64le-sanitizer` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/72/builds/873 Here is the relevant piece of the buil

[clang] [Clang] Add captures to the instantiation scope for noexcept specifiers (PR #97166)

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks! I think your fixme can be resolved in a follow up PR https://github.com/llvm/llvm-project/pull/97166 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-07-06 Thread via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-06 Thread via cfe-commits
@@ -1165,6 +1165,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, DefineType("__WCHAR_TYPE__", TI.getWCharType(), Builder); DefineType("__WINT_TYPE__", TI.getWIntType(), Builder); DefineTypeSizeAndWidth("__SIG_ATOMIC", TI.getSigAtomicType(), TI, Builder)

[clang] [clang][Sema] Improve `Sema::CheckCXXDefaultArguments` (PR #97338)

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. https://github.com/llvm/llvm-project/pull/97338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Support `guarded_by` attribute and related attributes inside C structs and support late parsing them (PR #95455)

2024-07-06 Thread Pierre d'Herbemont via cfe-commits
pdherbemont wrote: > LGTM. Let me know if you need me to merge this change. Yes, please! https://github.com/llvm/llvm-project/pull/95455 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang] Implement P2280R4 Using unknown pointers and references in constant expressions (PR #95474)

2024-07-06 Thread via cfe-commits
cor3ntin wrote: > Thank you work on this! I really like this feature. Will this PR also provide > support for the new constant interpreter? The new constant interpreter seems > to already support some unknown constexpr features (FYI > https://godbolt.org/z/xTYhGEfxT). It has the concept of `Du

[clang] [Clang] prevent checking destructor reference with an invalid initializer (PR #97860)

2024-07-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/97860 >From cb3c677c9eb10998ed7357cdde2722f3b3c1c847 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 6 Jul 2024 00:24:06 +0300 Subject: [PATCH] [Clang] prevent checking destructor reference with an invalid in

[clang] [Clang] fix cast failures by adjusting the resolution of record declaration contexts to handle semantic and lexical distinctions (PR #96228)

2024-07-06 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/96228 >From 9e2730da07df0ee5102912490a687ba40bf06def Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 24 Jun 2024 18:55:51 +0300 Subject: [PATCH] [Clang] fix cast failures by adjusting the resolution of record

[clang] e55585f - [Clang] Fix typo in cxx_status.html

2024-07-06 Thread via cfe-commits
Author: cor3ntin Date: 2024-07-06T16:18:20+02:00 New Revision: e55585fd7bddf5bb3824a53cbe2971206d3c20c6 URL: https://github.com/llvm/llvm-project/commit/e55585fd7bddf5bb3824a53cbe2971206d3c20c6 DIFF: https://github.com/llvm/llvm-project/commit/e55585fd7bddf5bb3824a53cbe2971206d3c20c6.diff LOG:

[clang] [Clang] [C23] Implement N2653: u8 strings are char8_t[] (PR #97208)

2024-07-06 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok updated https://github.com/llvm/llvm-project/pull/97208 >From ef0072d1fc9b14f7ee657fa95f44a686b78b525a Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Sun, 30 Jun 2024 12:07:54 +0100 Subject: [PATCH 1/6] [Clang] [C23] Implement N2653: u8 strings are char8_t[] ---

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-06 Thread via cfe-commits
memory-thrasher wrote: > Godbolt for reference: https://godbolt.org/z/b9v8KhPET Huh. Must be my vstools install on this windows laptop is out of date or broken in some other way. I could copy the scheme in that use case into my PR for at least a non-zero chance that it would match the msvc man

[clang] [InstallAPI] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97900 This patch addresses a static analyser concern about a potential null pointer dereference in the clang::installapi::enumerateFiles function. The recursive_directory_iterator could become invalid (i.e., i.State

[clang] [InstallAPI] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch addresses a static analyser concern about a potential null pointer dereference in the clang::installapi::enumerateFiles function. The recursive_directory_iterator could become invalid (i.e., i.State set

[clang] [[clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/97900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/97900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 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 9e9404387d3b787305dc8bf21b0e20c477b6ff39 dd36ef6dd52f57d175fd60534172f0e28e11ef48 --

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-06 Thread via cfe-commits
https://github.com/memory-thrasher updated https://github.com/llvm/llvm-project/pull/97792 >From 9f909ffb4714294d62264e541a44137adfcd7cb9 Mon Sep 17 00:00:00 2001 From: Sidney Kelley Date: Thu, 4 Jul 2024 23:03:16 -0700 Subject: [PATCH] Adds an arbitrary pseudonym to clang"s windows mangler to

[clang] Adds an arbitrary pseudonym to clang"s windows mangler... (PR #97792)

2024-07-06 Thread via cfe-commits
memory-thrasher wrote: PR updated to output mangled function name matching the one from godbolt for this specific use case. I suggest someone better at this stuff than me should eventually attempt to implement a more comprehensive mimicry. https://github.com/llvm/llvm-project/pull/97792 __

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97900 >From dd36ef6dd52f57d175fd60534172f0e28e11ef48 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 08:29:26 -0700 Subject: [PATCH 1/2] [InstallAPI] Fix potential null pointer dereference in file

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97902 Reported by Static Analyzer Tool: In clang::ASTNodeImporter::VisitCountAttributedType(clang::CountAttributedType const *): Using the auto keyword without an & causes the copy of an object of type TypeCoupledDe

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes Reported by Static Analyzer Tool: In clang::ASTNodeImporter::VisitCountAttributedType(clang::CountAttributedType const *): Using the auto keyword without an & causes the copy of an object of type TypeCoupledDeclRe

[clang] [clang-installapi] ] Fix potential null pointer dereference in file enumeration (PR #97900)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97900 >From dd36ef6dd52f57d175fd60534172f0e28e11ef48 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 08:29:26 -0700 Subject: [PATCH 1/3] [InstallAPI] Fix potential null pointer dereference in file

[clang] [llvm] [ValueTracking] use KnownBits to compute fpclass from bitcast (PR #97762)

2024-07-06 Thread Alex MacLean via cfe-commits
AlexMaclean wrote: > Can you add some tests to demonstrate that this patch will enable more > optimizations in some real-world applications? I can extend the existing test cases to make them more elaborate/real-looking, but I'm guessing that would not qualify as "real-world". This patch is mo

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/90574 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-06 Thread via cfe-commits
https://github.com/cor3ntin commented: I think this is starting to look pretty good. Can we simplify further by lexing the partition along with the module name, when there is one? We could also have a ModuleNameInfo::toString() function we could use in a couple places. https://github.com/llv

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-06 Thread via cfe-commits
@@ -741,6 +757,9 @@ class IdentifierTable { if (Name == "import") II->setModulesImport(true); +if (Name == "module") cor3ntin wrote: ```suggestion else if (Name == "module") ``` https://github.com/llvm/llvm-project/pull/90574 ___

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-06 Thread via cfe-commits
@@ -160,6 +160,8 @@ static char GetFirstChar(const Preprocessor &PP, const Token &Tok) { bool TokenConcatenation::AvoidConcat(const Token &PrevPrevTok, const Token &PrevTok, const Token &Tok) const { +

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-06 Thread via cfe-commits
@@ -35,6 +35,7 @@ #include "clang/Basic/SourceLocation.h" #include "clang/Basic/SourceManager.h" #include "clang/Basic/TargetInfo.h" +#include "clang/Basic/TokenKinds.h" cor3ntin wrote: I don't think we need that change https://github.com/llvm/llvm-project/pu

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-06 Thread via cfe-commits
@@ -905,6 +912,7 @@ void Preprocessor::Lex(Token &Result) { // This token is injected to represent the translation of '#include "a.h"' // into "import a.h;". Mimic the notional ';'. case tok::annot_module_include: +case tok::annot_repl_input_end: ---

[clang] [Clang] Implement P3034R1 Module Declarations Shouldn’t be Macros (PR #90574)

2024-07-06 Thread via cfe-commits
@@ -860,9 +861,15 @@ bool Preprocessor::HandleIdentifier(Token &Identifier) { ModuleImportLoc = Identifier.getLocation(); NamedModuleImportPath.clear(); IsAtImport = true; -ModuleImportExpectsIdentifier = true; CurLexerCallback = CLK_LexAfterModuleImport;

[clang] Enable aarch64-amazon-linux triple (PR #82232)

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

[clang] Enable aarch64-amazon-linux triple (PR #82232)

2024-07-06 Thread Fangrui Song via cfe-commits
MaskRay wrote: > I'm not the owner of this code, but I just dropped by to say that I don't > think this patch will be accepted. A few lines above your changes, there is a > comment that says, "Please don't add more elements to *Triples.". > > @MaskRay is working to reduce the number of target

[libunwind] [libunwind] fix unwinding from signal handler (PR #92291)

2024-07-06 Thread Saleem Abdulrasool via cfe-commits
@@ -365,7 +365,12 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, // Return address is address after call site instruction, so setting IP to // that does simulates a return. - newRegisters.setIP(returnAddress); + // + // In case

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Yupei Liu via cfe-commits
https://github.com/LYP951018 updated https://github.com/llvm/llvm-project/pull/97215 >From a997ae70f86230200b1082c9bdc0bdf56e30b7c4 Mon Sep 17 00:00:00 2001 From: letrec Date: Sun, 30 Jun 2024 21:03:23 +0800 Subject: [PATCH 1/2] Fix the order of addInstantiatedParameters in LambdaScopeForCallO

[clang] [Clang] Fix the order of addInstantiatedParameters in LambdaScopeForCallOperatorInstantiationRAII (PR #97215)

2024-07-06 Thread Yupei Liu via cfe-commits
@@ -2379,23 +2379,32 @@ Sema::LambdaScopeForCallOperatorInstantiationRAII:: SemaRef.RebuildLambdaScopeInfo(cast(FD)); - FunctionDecl *Pattern = getPatternFunctionDecl(FD); - if (Pattern) { -SemaRef.addInstantiatedCapturesToScope(FD, Pattern, Scope, MLTAL); + Function

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-07-06 Thread via cfe-commits
https://github.com/MagentaTreehouse created https://github.com/llvm/llvm-project/pull/97908 * Use range-based for * The value of `Conv` is not used when `ConvTemplate` is not null, so we do not need to compute it on that path >From def9d161e4ea79ee1b24a8d662a5c0dd17c2dd8f Mon Sep 17 00:00:00 2

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (MagentaTreehouse) Changes * Use range-based for * The value of `Conv` is not used when `ConvTemplate` is not null, so we do not need to compute it on that path --- Full diff: https://github.com/llvm/llvm-project/pull/97908.diff 1

[clang] [Clang] Fix null pointer dereference in VisitUsingEnumDecl (PR #97910)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97910 This patch addresses static analyzer concern where TSI could be dereferenced after being assigned a null value from SubstType in clang::TemplateDeclInstantiator::VisitUsingEnumDecl(clang::UsingEnumDecl *). The

[clang] [Clang] Fix null pointer dereference in VisitUsingEnumDecl (PR #97910)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch addresses static analyzer concern where TSI could be dereferenced after being assigned a null value from SubstType in clang::TemplateDeclInstantiator::VisitUsingEnumDecl(clang::UsingEnumDecl *). The fix

[libclc] [libclc] Fix cross in-tree builds (PR #97392)

2024-07-06 Thread via cfe-commits
https://github.com/GO-NFT-GO commented: Ok https://github.com/llvm/llvm-project/pull/97392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-06 Thread Mike Crowe via cfe-commits
https://github.com/mikecrowe created https://github.com/llvm/llvm-project/pull/97911 Expanding all macros in the printf/absl::StrFormat format string before conversion could easily break code if those macros are expended to change their definition between builds. It's important for this check

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Mike Crowe (mikecrowe) Changes Expanding all macros in the printf/absl::StrFormat format string before conversion could easily break code if those macros are expended to change their definition between builds. It's important for this

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Mike Crowe (mikecrowe) Changes Expanding all macros in the printf/absl::StrFormat format string before conversion could easily break code if those macros are expended to change their definition between builds. It's important f

[clang-tools-extra] [clang-tidy] Only expand macros in modernize-use-std-format/print (PR #97911)

2024-07-06 Thread Mike Crowe via cfe-commits
mikecrowe wrote: I'm not particularly happy with the `FormatStringConverter` constructor now taking seven parameters. The risk of them getting muddled isn't huge though because they are all of different types. Should I perhaps put them all into the `FormatStringConverter::Configuration` struct

[clang] [clang][Sema] Improve `collectViableConversionCandidates` (PR #97908)

2024-07-06 Thread via cfe-commits
https://github.com/MagentaTreehouse updated https://github.com/llvm/llvm-project/pull/97908 >From def9d161e4ea79ee1b24a8d662a5c0dd17c2dd8f Mon Sep 17 00:00:00 2001 From: Mingyi Chen Date: Sat, 6 Jul 2024 15:41:08 -0400 Subject: [PATCH 1/2] [clang][Sema] Improve `collectViableConversionCandidate

[clang] [Clang] Remove unnecessary copy (PR #97902)

2024-07-06 Thread Youngsuk Kim via cfe-commits
@@ -1551,7 +1551,7 @@ ASTNodeImporter::VisitCountAttributedType(const CountAttributedType *T) { Expr *CountExpr = importChecked(Err, T->getCountExpr()); SmallVector CoupledDecls; - for (auto TI : T->dependent_decls()) { + for (const TypeCoupledDeclRefInfo &TI : T->depen

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97912 This patch adds null check after TransformType call to avoid dereferencing a null pointer when calling getType(). >From c30e531027828d7b531d3791c48779b465e69360 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Da

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch adds null check after TransformType call to avoid dereferencing a null pointer when calling getType(). --- Full diff: https://github.com/llvm/llvm-project/pull/97912.diff 1 Files Affected: - (modified

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97912 >From c30e531027828d7b531d3791c48779b465e69360 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 14:02:16 -0700 Subject: [PATCH 1/2] [Clang] Prevent null pointer dereference in TransformUnaryT

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 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 8426b51e0e942b27af8a50b9cee53c1b68d139c2 87eceedcfabb4f3f3b7c69f970716a40c745bf7a --

[clang] [Clang] Prevent null pointer dereference in TransformUnaryTransformType() (PR #97912)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/97912 >From c30e531027828d7b531d3791c48779b465e69360 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Sat, 6 Jul 2024 14:02:16 -0700 Subject: [PATCH 1/3] [Clang] Prevent null pointer dereference in TransformUnaryT

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread via cfe-commits
https://github.com/smanna12 created https://github.com/llvm/llvm-project/pull/97913 This patch adds a null check for InstantiatedFrom to prevent dereferencing a null pointer during the template instantiation process in clang::Sema::SetupConstraintScope(). The fix ensures that the function exi

[clang] [Clang] Guard against null in template instantiation process (PR #97913)

2024-07-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (smanna12) Changes This patch adds a null check for InstantiatedFrom to prevent dereferencing a null pointer during the template instantiation process in clang::Sema::SetupConstraintScope(). The fix ensures that the function exits e

  1   2   >