[clang] [clang-repl] Remove invalid TopLevelStmtDecl from TU on parse failure (PR #153945)

2025-08-16 Thread Vassil Vassilev via cfe-commits
@@ -91,6 +93,53 @@ TEST_F(InterpreterTest, IncrementalInputTopLevelDecls) { EXPECT_EQ("var2", DeclToString(*R2DeclRange.begin())); } +TEST_F(InterpreterTest, BadIncludeDoesNotCorruptTU) { vgvassilev wrote: Can we extend either `clang/test/Interpreter/execut

[clang] [clang-repl] Remove invalid TopLevelStmtDecl from TU on parse failure (PR #153945)

2025-08-16 Thread Vassil Vassilev via cfe-commits
@@ -5696,8 +5696,11 @@ Parser::DeclGroupPtrTy Parser::ParseTopLevelStmtDecl() { TopLevelStmtDecl *TLSD = Actions.ActOnStartTopLevelStmtDecl(getCurScope()); StmtResult R = ParseStatementOrDeclaration(Stmts, SubStmtCtx); Actions.ActOnFinishTopLevelStmtDecl(TLSD, R.get()); -

[clang] [clang][bytecode] Fix pseudo dtor calls on non-pointers (PR #153970)

2025-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/153970 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e44784f - [clang][bytecode] Fix pseudo dtor calls on non-pointers (#153970)

2025-08-16 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-17T08:47:57+02:00 New Revision: e44784fb44bd00acc0ecd25537a359c3a1df8f17 URL: https://github.com/llvm/llvm-project/commit/e44784fb44bd00acc0ecd25537a359c3a1df8f17 DIFF: https://github.com/llvm/llvm-project/commit/e44784fb44bd00acc0ecd25537a359c3a1df8f17.diff L

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
@@ -197,6 +197,9 @@ class ResultBuilder { /// Whether the \p ObjectTypeQualifiers field is active. bool HasObjectTypeQualifiers; + // Whether the member function is using an explicit object parameter + bool IsExplicitObjectMemberFunction; MythreyaK wrote

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initializer` false positive for inherited members (PR #153941)

2025-08-16 Thread via cfe-commits
https://github.com/v1nh1shungry updated https://github.com/llvm/llvm-project/pull/153941 >From 05f32d9dfe70e08c9a72f972a7c48116575081f8 Mon Sep 17 00:00:00 2001 From: Yuanjing Hong Date: Fri, 15 Aug 2025 15:59:35 +0800 Subject: [PATCH] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initiali

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/153760 >From 690f034b5854714abe6630de85fb0b7b5b947462 Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Fri, 15 Aug 2025 00:52:37 -0700 Subject: [PATCH 1/3] [clang] Skip unqualified members in explicit-member

[clang] [clang] Fix typos in OMPClauseProfiler method names for consistency (PR #153852)

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

[clang] 3d83dbb - [clang] Fix typos in OMPClauseProfiler method names for consistency (#153852)

2025-08-16 Thread via cfe-commits
Author: Errant Date: 2025-08-17T07:01:59+02:00 New Revision: 3d83dbb73610c6cfb1b67252bd2d519a0aa5e308 URL: https://github.com/llvm/llvm-project/commit/3d83dbb73610c6cfb1b67252bd2d519a0aa5e308 DIFF: https://github.com/llvm/llvm-project/commit/3d83dbb73610c6cfb1b67252bd2d519a0aa5e308.diff LOG: [

[clang] [clang] Fix typos in OMPClauseProfiler method names for consistency (PR #153852)

2025-08-16 Thread Corentin Jabot via cfe-commits
https://github.com/cor3ntin closed https://github.com/llvm/llvm-project/pull/153852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Allow pmuludq/pmuldq to be used in constexpr (PR #153293)

2025-08-16 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/153293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Add OneLineFormatOffRegex option (PR #137577)

2025-08-16 Thread via cfe-commits
owenca wrote: Updated the doc in ee51f35993d9623563551f9bb9521824992967b6. https://github.com/llvm/llvm-project/pull/137577 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ee51f35 - [clang-format][doc] Add OneLineFormatOffRegex to format-off section

2025-08-16 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-08-16T20:59:07-07:00 New Revision: ee51f35993d9623563551f9bb9521824992967b6 URL: https://github.com/llvm/llvm-project/commit/ee51f35993d9623563551f9bb9521824992967b6 DIFF: https://github.com/llvm/llvm-project/commit/ee51f35993d9623563551f9bb9521824992967b6.diff LOG:

[clang] [clang] fix redecl chain assumption when checking liknkage consistency (PR #153996)

2025-08-16 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/153996 In C++, it can be assumed the same linkage will be computed for all redeclarations of an entity, and we have assertions to check this. However, the linkage for a declaration can be requested in the middle of

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-16 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: > We started to see a CI failure around the time this PR landed in > https://green.lab.llvm.org/job/llvm.org/job/clang-stage2-Rthinlto/1079/ > Any ideas what might be going on here? @Xazax-hun this could be the same as https://github.com/llvm/llvm-project/issues/153933 Could y

[clang] [clang] fix redecl chain assumption when checking liknkage consistency (PR #153996)

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

[clang] [clang] fix redecl chain assumption when checking liknkage consistency (PR #153996)

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

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
@@ -1428,6 +1428,16 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + if (isa(R.Declaration)) { +// If result is a member in the context of an explicit-object member +// function, drop it because it must be acces

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK updated https://github.com/llvm/llvm-project/pull/153760 >From 690f034b5854714abe6630de85fb0b7b5b947462 Mon Sep 17 00:00:00 2001 From: Mythreya Kuricheti Date: Fri, 15 Aug 2025 00:52:37 -0700 Subject: [PATCH 1/3] [clang] Skip unqualified members in explicit-member

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Nathan Ridge via cfe-commits
@@ -1428,6 +1428,16 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + if (isa(R.Declaration)) { +// If result is a member in the context of an explicit-object member +// function, drop it because it must be acces

[clang] [C] Add (new) -Wimplicit-void-ptr-cast to -Wc++-compat (PR #136855)

2025-08-16 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: Hi @AaronBallman I noticed that this commit makes a difference on the example below. ``` #include typedef const struct T * T_Ref; static T_Ref _Atomic x = ATOMIC_VAR_INIT((void*)NULL); ``` After this commit, the AST of the global variable declaration changes---a level of `

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK edited https://github.com/llvm/llvm-project/pull/153760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK edited https://github.com/llvm/llvm-project/pull/153760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream GotoOp (PR #153701)

2025-08-16 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/153701 >From 6a7e6851c085a6c3c22aea8fea31c005dcb5c7d9 Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Thu, 14 Aug 2025 17:14:45 -0500 Subject: [PATCH 1/3] [CIR] Upstream GotoOp --- .../CIR/Dialect/Buil

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
https://github.com/MythreyaK edited https://github.com/llvm/llvm-project/pull/153760 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
@@ -1428,6 +1428,16 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + if (isa(R.Declaration)) { +// If result is a member in the context of an explicit-object member +// function, drop it because it must be acces

[clang-tools-extra] [clangd] Retrieve documentation for member function instance from index (PR #153337)

2025-08-16 Thread Nathan Ridge via cfe-commits
@@ -1887,7 +1887,19 @@ class CodeCompleteFlow { for (auto &Cand : C.first) { if (Cand.SemaResult && Cand.SemaResult->Kind == CodeCompletionResult::RK_Declaration) { -auto ID = clangd::getSymbolID(Cand.SemaResult->getDeclaration()); +

[clang-tools-extra] [clang-doc] add Markdown Tag JS library (PR #153650)

2025-08-16 Thread Erick Velez via cfe-commits
https://github.com/evelez7 closed https://github.com/llvm/llvm-project/pull/153650 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Nathan Ridge via cfe-commits
@@ -1428,6 +1428,16 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + if (isa(R.Declaration)) { +// If result is a member in the context of an explicit-object member +// function, drop it because it must be acces

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Mythreya Kuricheti via cfe-commits
@@ -1428,6 +1428,16 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + if (isa(R.Declaration)) { +// If result is a member in the context of an explicit-object member +// function, drop it because it must be acces

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Nathan Ridge via cfe-commits
@@ -1428,6 +1428,16 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + if (isa(R.Declaration)) { +// If result is a member in the context of an explicit-object member +// function, drop it because it must be acces

[clang] [clang-tools-extra] [clang] Skip suggesting unqualified members in explicit-object member functions (PR #153760)

2025-08-16 Thread Nathan Ridge via cfe-commits
@@ -1428,6 +1428,16 @@ void ResultBuilder::AddResult(Result R, DeclContext *CurContext, AdjustResultPriorityForDecl(R); + if (isa(R.Declaration)) { HighCommander4 wrote: The check should apply to methods as well as fields: ```c++ struct A { int method

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @AaronBallman @cor3ntin I have an idea, and I'd like to see what you think. We currently have the misery of these has_feature checks, I'm wondering if we can make them _all_ darwin only, so for each one, say ptrauth_calls we add a predefined macro like `__PTRAUTH_ABI_PTRAUTH_CALL

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-08-16 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274 >From 2110f92892dd72dfbe1a7d87116faa3693c7c586 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH 01/35] workflows/release-binaries: Enable Windows x86 builds ---

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > ```c++ > auto x = [](U, U = U::bar) {}; > ``` I think I technically knew you could have templated lambdas, but I certainly forgot about it entirely :D What I'm trying to construct is something that would not trigger an error if it was wrapped in an `if constexpr(0)` inside t

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-16 Thread Matheus Izvekov via cfe-commits
@@ -2586,8 +2561,9 @@ bool CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty, } case Type::InjectedClassName: -mangleSourceNameWithAbiTags( -cast(Ty)->getDecl()); +mangleSourceNameWithAbiTags(cast(Ty) +->getOrig

[clang] [Clang][Sema] Check the return value of DiagnoseClassNameShadow in ActOnEnumConstant (PR #143754)

2025-08-16 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/143754 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f874092 - [Clang][Sema] Check the return value of DiagnoseClassNameShadow in ActOnEnumConstant (#143754)

2025-08-16 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2025-08-16T14:08:39-07:00 New Revision: f8740920eec94f04752ad7bf1b86de9587412b1c URL: https://github.com/llvm/llvm-project/commit/f8740920eec94f04752ad7bf1b86de9587412b1c DIFF: https://github.com/llvm/llvm-project/commit/f8740920eec94f04752ad7bf1b86de9587412b1c.dif

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -2586,8 +2561,9 @@ bool CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty, } case Type::InjectedClassName: -mangleSourceNameWithAbiTags( -cast(Ty)->getDecl()); +mangleSourceNameWithAbiTags(cast(Ty) +->getOrig

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Corentin Jabot via cfe-commits
cor3ntin wrote: > @cor3ntin One thing I'm trying to work out in tests is whether there is any > way to get a discarded block that should cause an error in the containing > scope but not if it occurred in the lamda instantiation. There are never any errors ignored in discarded statements. If th

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-16 Thread Matheus Izvekov via cfe-commits
@@ -2586,8 +2561,9 @@ bool CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty, } case Type::InjectedClassName: -mangleSourceNameWithAbiTags( -cast(Ty)->getDecl()); +mangleSourceNameWithAbiTags(cast(Ty) +->getOrig

[clang] [clang] return type not correctly deduced for discarded lambdas (PR #153921)

2025-08-16 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > This should work > > ```diff > diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp > b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp > index f02a295220ef..6b423ce06523 100644 > --- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp > +++ b/clang/lib/Sema/SemaTemplateInsta

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -2586,8 +2561,9 @@ bool CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty, } case Type::InjectedClassName: -mangleSourceNameWithAbiTags( -cast(Ty)->getDecl()); +mangleSourceNameWithAbiTags(cast(Ty) +->getOrig

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-08-16 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274 >From 2110f92892dd72dfbe1a7d87116faa3693c7c586 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH 01/34] workflows/release-binaries: Enable Windows x86 builds ---

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,85 @@ +// RUN: %clang -target arm64 -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %clang -target arm64-apple-macosx -DNO_DEFAULT_PTRAUTH %s -fsyntax-only -Xclang -verify=no_default_ptrauth +// RUN: %cl

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/153722 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][PAC][darwin] Set correct default ptrauth features for arm64e-darwin (PR #153722)

2025-08-16 Thread Oliver Hunt via cfe-commits
@@ -3291,6 +3291,39 @@ void Darwin::addClangTargetOptions( if (!RequiresSubdirectorySearch) CC1Args.push_back("-fno-modulemap-allow-subdirectory-search"); } + + if (getTriple().isArm64e()) { ojhunt wrote: I've done this - the out of date-ness was

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initializer` false positive for inherited members (PR #153941)

2025-08-16 Thread via cfe-commits
@@ -650,3 +650,20 @@ struct InitFromBindingDecl { } }; } // namespace GH82970 + +namespace inherited_members { v1nh1shungry wrote: Thanks for the review! The suggestion is reasonable, and I'd also update the commit message and the release note to emphasize

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-08-16 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274 >From 2110f92892dd72dfbe1a7d87116faa3693c7c586 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH 01/33] workflows/release-binaries: Enable Windows x86 builds ---

[clang] [clang][analyzer] Relax assertion for non-default address spaces in the cstring checker (PR #153498)

2025-08-16 Thread Isaac Nudelman via cfe-commits
@@ -1,11 +1,27 @@ // RUN: %clang_analyze_cc1 -triple amdgcn-unknown-unknown \ -// RUN: -analyzer-checker=core -verify %s +// RUN: -Wno-incompatible-library-redeclaration \ +// RUN: -analyzer-checker=core,unix.cstring.BadSizeArg -verify %s nuudlman wrote: I

[clang] [clang][analyzer] Relax assertion for non-default address spaces in the cstring checker (PR #153498)

2025-08-16 Thread Isaac Nudelman via cfe-commits
@@ -1,11 +1,27 @@ // RUN: %clang_analyze_cc1 -triple amdgcn-unknown-unknown \ -// RUN: -analyzer-checker=core -verify %s +// RUN: -Wno-incompatible-library-redeclaration \ +// RUN: -analyzer-checker=core,unix.cstring.BadSizeArg -verify %s // expected-no-diagnostics //

[clang] [clang][analyzer] Relax assertion for non-default address spaces in the cstring checker (PR #153498)

2025-08-16 Thread Isaac Nudelman via cfe-commits
https://github.com/nuudlman updated https://github.com/llvm/llvm-project/pull/153498 >From 9b7fd4839440ade71e1b9561b158dd37969b7def Mon Sep 17 00:00:00 2001 From: Isaac Nudelman <62861466+nuudl...@users.noreply.github.com> Date: Wed, 13 Aug 2025 23:02:11 +0200 Subject: [PATCH 1/4] Support non-de

[clang] [clang][analyzer] Relax assertion for non-default address spaces in the cstring checker (PR #153498)

2025-08-16 Thread Isaac Nudelman via cfe-commits
@@ -1129,9 +1129,9 @@ bool CStringChecker::isFirstBufInBound(CheckerContext &C, ProgramStateRef State, if (!ER) return true; // cf top comment. - // FIXME: Does this crash when a non-standard definition - // of a library function is encountered? - assert(ER->getValue

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-16 Thread Matheus Izvekov via cfe-commits
@@ -2586,8 +2561,9 @@ bool CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty, } case Type::InjectedClassName: -mangleSourceNameWithAbiTags( -cast(Ty)->getDecl()); +mangleSourceNameWithAbiTags(cast(Ty) +->getOrig

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initializer` false positive for inherited members (PR #153941)

2025-08-16 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp edited https://github.com/llvm/llvm-project/pull/153941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initializer` false positive for inherited members (PR #153941)

2025-08-16 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM, please fix the CI errors :) https://github.com/llvm/llvm-project/pull/153941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initializer` false positive for inherited members (PR #153941)

2025-08-16 Thread Carlos Galvez via cfe-commits
@@ -650,3 +650,20 @@ struct InitFromBindingDecl { } }; } // namespace GH82970 + +namespace inherited_members { carlosgalvezp wrote: Nit: the issue is not just about inherited members, since that's working well before this patch. The key is the child class b

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initializer` false positive for inherited members (PR #153941)

2025-08-16 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: This should fix #104400 https://github.com/llvm/llvm-project/pull/153941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-08-16 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274 >From 2110f92892dd72dfbe1a7d87116faa3693c7c586 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH 01/32] workflows/release-binaries: Enable Windows x86 builds ---

[clang] [clang][bytecode] Fix pseudo dtor calls on non-pointers (PR #153970)

2025-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes The isGLValue() check made us ignore expressions we shouldn't ignore. --- Full diff: https://github.com/llvm/llvm-project/pull/153970.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp

[clang] [clang][bytecode] Fix pseudo dtor calls on non-pointers (PR #153970)

2025-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/153970 The isGLValue() check made us ignore expressions we shouldn't ignore. >From 897df860f4205ab3d5669b96f336824d600555b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 16 Aug 2025 20:34:03

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Enhance the check for the scenario with MemberExpr initialization. (PR #151936)

2025-08-16 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor commented: Could we add tests with: `a.member.foo()` `a.foo().member` https://github.com/llvm/llvm-project/pull/151936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Enhance the check for the scenario with MemberExpr initialization. (PR #151936)

2025-08-16 Thread Baranov Victor via cfe-commits
@@ -273,6 +273,18 @@ void UnnecessaryCopyInitialization::registerMatchers(MatchFinder *Finder) { Finder->addMatcher(LocalVarCopiedFrom(declRefExpr( to(varDecl(hasLocalStorage()).bind(OldVarDeclId, this); + + auto DeclRefToCo

[clang-tools-extra] [clang-tidy] performance-unnecessary-copy-initialization: Enhance the check for the scenario with MemberExpr initialization. (PR #151936)

2025-08-16 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor edited https://github.com/llvm/llvm-project/pull/151936 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Fix `cppcoreguidelines-prefer-member-initializer` false positive for inherited members (PR #153941)

2025-08-16 Thread Baranov Victor via cfe-commits
https://github.com/vbvictor approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/153941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

2025-08-16 Thread Tom Honermann via cfe-commits
@@ -410,6 +474,36 @@ class OutlinedFunctionDeclBodyInstantiator ParmDeclMap &MapRef; }; +OutlinedFunctionDecl *BuildSYCLKernelEntryPointOutline(Sema &SemaRef, + FunctionDecl *FD, +

[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

2025-08-16 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/152403 >From 5b42f6b9470a96a79b3474fcf384fa950449e095 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Wed, 6 Aug 2025 19:26:54 -0700 Subject: [PATCH 1/3] [SYCL] SYCL host kernel launch support for the sycl_kern

[clang] [SYCL] SYCL host kernel launch support for the sycl_kernel_entry_point attribute. (PR #152403)

2025-08-16 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/152403 >From 5b42f6b9470a96a79b3474fcf384fa950449e095 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Wed, 6 Aug 2025 19:26:54 -0700 Subject: [PATCH 1/2] [SYCL] SYCL host kernel launch support for the sycl_kern

[clang] [clang-tools-extra] [clang] Improve nested name specifier AST representation (PR #147835)

2025-08-16 Thread Andrey Ali Khan Bolshakov via cfe-commits
@@ -2586,8 +2561,9 @@ bool CXXNameMangler::mangleUnresolvedTypeOrSimpleId(QualType Ty, } case Type::InjectedClassName: -mangleSourceNameWithAbiTags( -cast(Ty)->getDecl()); +mangleSourceNameWithAbiTags(cast(Ty) +->getOrig

[clang-tools-extra] [clang-tidy] Remove addition of emacs tag in checks headers (PR #153942)

2025-08-16 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. LGTM! I agree cleaning existing code shall be done in another PR, via some automated script. https://github.com/llvm/llvm-project/pull/153942 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [llvm] workflows/release-binaries: Enable Windows x86 builds (PR #128274)

2025-08-16 Thread Tom Stellard via cfe-commits
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/128274 >From 2110f92892dd72dfbe1a7d87116faa3693c7c586 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 22 Feb 2025 03:08:24 + Subject: [PATCH 01/31] workflows/release-binaries: Enable Windows x86 builds ---

[clang] [llvm] Add __builtin_wasm_js_catch (PR #153767)

2025-08-16 Thread Sam Clegg via cfe-commits
sbc100 wrote: If this is related specifically to JSPI, perhaps the PR title/description should include that? https://github.com/llvm/llvm-project/pull/153767 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/153796 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 2025 20:22:38 +0200 Subject: [PATCH 1/3] [CIR] Upstream DivOp for ComplexType --- clang/include

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -858,6 +853,21 @@ mlir::Value ComplexExprEmitter::emitBinMul(const BinOpInfo &op) { return builder.createComplexCreate(op.loc, newReal, newImag); } +mlir::Value ComplexExprEmitter::emitBinDiv(const BinOpInfo &op) { + assert(!cir::MissingFeatures::fastMathFlags()); + as

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -858,6 +853,21 @@ mlir::Value ComplexExprEmitter::emitBinMul(const BinOpInfo &op) { return builder.createComplexCreate(op.loc, newReal, newImag); } +mlir::Value ComplexExprEmitter::emitBinDiv(const BinOpInfo &op) { + assert(!cir::MissingFeatures::fastMathFlags()); + as

[clang-tools-extra] [clang-tidy] Remove addition of emacs tag in checks headers (PR #153942)

2025-08-16 Thread Baranov Victor via cfe-commits
vbvictor wrote: > We should also ask for similar changes in open pull requests. This is a low priority task so I wouldn't bother contributors to manually correct files. For replacement - I need to write a script for bulk update and I didn't have time. So I'd do that in another PR. Maybe someo

[clang] [clang][bytecode] Prefer ParmVarDecls as function parameters (PR #153952)

2025-08-16 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/29070 Here is the relevant piece of the build lo

[clang] [clang][bytecode] Prefer ParmVarDecls as function parameters (PR #153952)

2025-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/153952 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 373206d - [clang][bytecode] Prefer ParmVarDecls as function parameters (#153952)

2025-08-16 Thread via cfe-commits
Author: Timm Baeder Date: 2025-08-16T17:22:14+02:00 New Revision: 373206d5e0591896477f988e4194f59eee7981e1 URL: https://github.com/llvm/llvm-project/commit/373206d5e0591896477f988e4194f59eee7981e1 DIFF: https://github.com/llvm/llvm-project/commit/373206d5e0591896477f988e4194f59eee7981e1.diff L

[clang] [Headers][X86] Allow pmuludq/pmuldq to be used in constexpr (PR #153293)

2025-08-16 Thread Pedro Lobo via cfe-commits
@@ -389,6 +389,7 @@ __m64 test_mm_mul_su32(__m64 a, __m64 b) { // CHECK: mul <2 x i64> %{{.*}}, %{{.*}} return _mm_mul_su32(a, b); } +TEST_CONSTEXPR(match_m64(_mm_mul_su32((__m64)(__v4hi){+1, -2, +3, -4}, (__m64)(__v4hi){-10, +8, +6, -4}), 2533154533212150)); -

[clang] [Headers][X86] Allow pmuludq/pmuldq to be used in constexpr (PR #153293)

2025-08-16 Thread Pedro Lobo via cfe-commits
https://github.com/pedroclobo updated https://github.com/llvm/llvm-project/pull/153293 >From 4163545d41d9e0336c6aaf32d19ceb161fbb6214 Mon Sep 17 00:00:00 2001 From: Pedro Lobo Date: Fri, 15 Aug 2025 18:57:28 +0100 Subject: [PATCH 1/2] [Headers][X86] Allow pmuludq/pmuldq to be used in constexpr

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2025-08-16 Thread Luca Versari via cfe-commits
veluca93 wrote: FYI I recently rebased this PR on a more recent LLVM (see https://github.com/veluca93/llvm-project/commit/a2a65fd61594a3fdbc2afed8bfe3fa4dcdafff08), although I believe llvm has changed enough that some more changes are needed after this (I ultimately ended up adapting my old pa

[clang] Fix Clang bug that -Wformat-signedness is not reported properly. (PR #150962)

2025-08-16 Thread via cfe-commits
DeanSturtevant1 wrote: Just a note -- the gcc incompatibity noted above is due to the default for -Wformat being different between the two compilers. By default. Clang enables it, gcc disables it. https://github.com/llvm/llvm-project/pull/150962 ___

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -3415,4 +3415,126 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> { }]; } +//===--===// +// Variadic Operations +//===--

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -3415,4 +3415,126 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> { }]; } +//===--===// +// Variadic Operations +//===--

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -3415,4 +3415,126 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> { }]; } +//===--===// +// Variadic Operations +//===--

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -384,6 +384,19 @@ class ScalarExprEmitter : public StmtVisitor { return Visit(e->getReplacement()); } + mlir::Value VisitVAArgExpr(VAArgExpr *ve) { +QualType Ty = ve->getType(); + +if (Ty->isVariablyModifiedType()) { xlauko wrote: ```sugges

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -384,6 +384,19 @@ class ScalarExprEmitter : public StmtVisitor { return Visit(e->getReplacement()); } + mlir::Value VisitVAArgExpr(VAArgExpr *ve) { +QualType Ty = ve->getType(); + +if (Ty->isVariablyModifiedType()) { + cgf.cgm.errorNYI(ve->getSourceRang

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -384,6 +384,19 @@ class ScalarExprEmitter : public StmtVisitor { return Visit(e->getReplacement()); } + mlir::Value VisitVAArgExpr(VAArgExpr *ve) { +QualType Ty = ve->getType(); xlauko wrote: ```suggestion QualType ty = ve->getType(); ```

[clang] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

2025-08-16 Thread Max Desiatov via cfe-commits
MaxDesiatov wrote: > Now that WASI SDK has `` support in `wasm32-wasip1` (the > single-threaded target) it is time to revisit the PR, as I believe all other > changes do not require upstream WASI SDK work. Would you have a moment to resolve conflicts then? https://github.com/llvm/llvm-project

[clang-tools-extra] [clang-tidy] Remove addition of emacs tag in checks headers (PR #153942)

2025-08-16 Thread via cfe-commits
EugeneZelenko wrote: How about replacement in existing code? We should also ask for similar changes in open pull requests. https://github.com/llvm/llvm-project/pull/153942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] [clang][bytecode] Prefer ParmVarDecls as function parameters (PR #153952)

2025-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/153952 >From 04fdc45accf6fca4d7761d8d3ade845001a99a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 16 Aug 2025 15:07:58 +0200 Subject: [PATCH] [clang][bytecode] Prefer ParmVarDecls as functi

[clang] [clang][bytecode] Prefer ParmVarDecls as function parameters (PR #153952)

2025-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/153952 >From e6237951e3b0cb9022d1583cbdf978d3c4abbe66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 16 Aug 2025 15:07:58 +0200 Subject: [PATCH] [clang][bytecode] Prefer ParmVarDecls as functi

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/153796 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 2025 20:22:38 +0200 Subject: [PATCH 1/2] [CIR] Upstream DivOp for ComplexType --- clang/include

[clang] [clang][bytecode] Prefer ParmVarDecls as function parameters (PR #153952)

2025-08-16 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes We might create a local temporary variable for a ParmVarDecl, in which case a DeclRefExpr for that ParmVarDecl should _still_ result in us choosing the parameter, not that local. --- Full diff: https://gith

[clang] [clang][bytecode] Prefer ParmVarDecls as function parameters (PR #153952)

2025-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/153952 We might create a local temporary variable for a ParmVarDecl, in which case a DeclRefExpr for that ParmVarDecl should _still_ result in us choosing the parameter, not that local. >From bbf6cd50e1f41838605cfca

[clang] [clang][bytecode] Improve __builtin_{,dynamic_}object_size implementation (PR #153601)

2025-08-16 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/153601 >From 9a50e6a74a1fe253462e3afd12794da5f919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 14 Aug 2025 17:13:56 +0200 Subject: [PATCH] bos --- clang/lib/AST/ByteCode/Compiler.cpp

[clang] [clang] Fix typos in OMPClauseProfiler method names for consistency (PR #153852)

2025-08-16 Thread via cfe-commits
Errant404 wrote: @cor3ntin Can you merge this PR? I don't have write access. https://github.com/llvm/llvm-project/pull/153852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix typos in OMPClauseProfiler method names for consistency (PR #153852)

2025-08-16 Thread via cfe-commits
https://github.com/Errant404 updated https://github.com/llvm/llvm-project/pull/153852 >From 840d378897a9020b6f5c4d72b42a5acda4b58aeb Mon Sep 17 00:00:00 2001 From: Errant404 Date: Sat, 16 Aug 2025 02:48:37 +0800 Subject: [PATCH] Fix typos in OMPClauseProfiler method names for consistency ---

  1   2   >