[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 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 HEAD~1 HEAD --extensions cpp -- clang/test/CIR/CodeGenOpenACC/loop.cpp clang/lib/CIR

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
emaxx-google wrote: > It is not clear to me why this is a specifically a problem when called from > `Profile(...)` can you elaborate a bit more in the summary. I've added a bit more details - it's basically the fact that the "get most recent" operation triggered the load of new nodes from the

[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes As can be seen by the comment, this ends up being a construct that is going to be quite a lot of work in the future to make sure we properly identify the upperbound, lowerbound, and step. For now, we just

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [OpenACC][CIR] Start work to lower 'loop' (PR #137972)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/137972 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,san

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,29 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +AST_MATCHER(clang::TypeLoc, isInImplicitTemplateInstantiation) { + const auto IsImplicitTemplateInstantiation = [](const auto *Node) { +return (Node != nullptr) && +

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
https://github.com/emaxx-google edited https://github.com/llvm/llvm-project/pull/137910 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread via cfe-commits
@@ -235,7 +237,8 @@ Changes in existing checks - Improved :doc:`bugprone-unsafe-functions ` check to allow specifying - additional functions to match. + additional functions to match. Added `ctime` and `localtime` + to unsafe functions check in clang-tidy. ---

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

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

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,29 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +AST_MATCHER(clang::TypeLoc, isInImplicitTemplateInstantiation) { + const auto IsImplicitTemplateInstantiation = [](const auto *Node) { +return (Node != nullptr) && +

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-30 Thread Baranov Victor via cfe-commits
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc, vbvictor wrote: Maybe previous devs did not cover all cases, so you didn't have

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread Zishan Mirza via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [clang-format] Add AlignAfterOpenBracketOptions (PR #108332)

2025-04-30 Thread Gedare Bloom via cfe-commits
https://github.com/gedare updated https://github.com/llvm/llvm-project/pull/108332 >From 8846ff045f969b258554c3cfb72161e9f61dda19 Mon Sep 17 00:00:00 2001 From: Gedare Bloom Date: Thu, 20 Jun 2024 17:35:39 -0600 Subject: [PATCH 1/2] Format: add AlignAfterControlStatement Introduce new style op

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread Zishan Mirza via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [llvm] [mlir] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/137958 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-ser

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Maksim Ivanov via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] Add spir_kernel attribute (PR #137882)

2025-04-30 Thread Nick Sarnie via cfe-commits
https://github.com/sarnex edited https://github.com/llvm/llvm-project/pull/137882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > LGTM! Do you need me to land the changes on your behalf? > > > > > > Yup, I don't have access yet > > I'll push the changes once precommit CI goes green. Thank you for the > improvement! FYI: it looks like precommit CI found a failure with one of the tests https://

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread Zishan Mirza via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[libclc] 75f040a - [libclc] Clean up unnecessary #undef __CLC_BODYs (#137959)

2025-04-30 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-04-30T16:13:04+01:00 New Revision: 75f040ab3e119e0ee87963ec9d2a01b1e6d4039e URL: https://github.com/llvm/llvm-project/commit/75f040ab3e119e0ee87963ec9d2a01b1e6d4039e DIFF: https://github.com/llvm/llvm-project/commit/75f040ab3e119e0ee87963ec9d2a01b1e6d4039e.diff

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm still not sure I understand the problem this is solving, but I also don't see any harm in it, so I'm leaning towards accept here. Aaron can be the final approval though. https://github.com/llvm/llvm-project/pull/137910

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/137959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang AST] move mangling API to namespace clang to allow calls from swift-frontend (PR #137884)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137884 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Wenju He via cfe-commits
https://github.com/wenju-he created https://github.com/llvm/llvm-project/pull/137932 3-component vector type is supported for them per OpenCL spec. >From cafb374de8d77c82fa450b732a122663090f6e34 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Wed, 30 Apr 2025 00:44:50 -0700 Subject: [PATCH] [lib

[clang] [flang] [llvm] Add IR Profile-Guided Optimization (IR PGO) support to the Flang compiler (PR #136098)

2025-04-30 Thread via cfe-commits
@@ -19,6 +21,7 @@ template class Expected; template class IntrusiveRefCntPtr; class Module; class MemoryBufferRef; +extern cl::opt ClPGOColdFuncAttr; fanju110 wrote: I think you're right, I'll just put it back in BackendUtil.cpp. I'm going to leave this exp

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/137829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -5024,3 +5024,9 @@ def OpenACCRoutineDecl :InheritableAttr { void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const; }]; } + +def NonString : InheritableAttr { + let Spellings = [GCC<"nonstring">]; erichkeane wrote: No interest

[clang] [clang] Remove FEM_Indeterminable (PR #137247)

2025-04-30 Thread Nico Weber via cfe-commits
nico wrote: > What is the warning? => #137247 https://github.com/llvm/llvm-project/pull/137247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -0,0 +1,364 @@ +// expected-no-diagnostics alexey-bataev wrote: The tests with classes and function members are required, as well as classes, used in conditions https://github.com/llvm/llvm-project/pull/131838 ___

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -10554,6 +10687,8 @@ SemaOpenMP::ActOnOpenMPDispatchDirective(ArrayRef Clauses, return StmtError(); Stmt *S = cast(AStmt)->getCapturedStmt(); + if (isa(S)) +S = cast(S)->getCapturedStmt(); alexey-bataev wrote: ```suggestion if (auto *CS = dyn

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4280,6 +4282,15 @@ getTargetRegionParams(Sema &SemaRef) { return Params; } +static SmallVector +getDispatchRegionParams(Sema &SemaRef) { + ASTContext &Context = SemaRef.getASTContext(); + SmallVector Params; + + Params.push_back(std::make_pair(StringRef(), QualType())

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [Clang][OpenMP] Support for dispatch construct (Sema & Codegen) support (PR #131838)

2025-04-30 Thread Alexey Bataev via cfe-commits
@@ -4529,6 +4529,191 @@ void CodeGenFunction::EmitOMPMasterDirective(const OMPMasterDirective &S) { emitMaster(*this, S); } +static Expr *replaceWithNewTraitsOrDirectCall(CapturedDecl *CDecl, + Expr *NewExpr) { + Expr *CurrentCa

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Nikita Popov via cfe-commits
@@ -912,6 +912,11 @@ class BlockAddress final : public Constant { /// block must be embedded into a function. static BlockAddress *get(BasicBlock *BB); + /// Return a BlockAddress for the specified basic block, which may not be + /// part of a function. The specified typ

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 >From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001 From: hulxv Date: Tue, 25 Mar 2025 22:56:51 +0200 Subject: [PATCH 1/8] [include-cleaner] rename enabled flags to `disable-*` --- .../includ

[clang] [clang] Fix nondeterminism in MemberPointerType (PR #137910)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -3610,7 +3611,7 @@ class MemberPointerType : public Type, public llvm::FoldingSetNode { } void Profile(llvm::FoldingSetNodeID &ID) { -Profile(ID, getPointeeType(), getQualifier(), getMostRecentCXXRecordDecl()); +Profile(ID, getPointeeType(), getQualifier(), ge

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
@@ -183,9 +195,26 @@ class Action : public clang::ASTFrontendAction { auto Results = analyze(AST.Roots, PP.MacroReferences, PP.Includes, &PI, getCompilerInstance().getPreprocessor(), HeaderFilter); -if (!Insert) + +if (!Insert) { + llvm:

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-ser

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
hulxv wrote: I think all is fine now https://github.com/llvm/llvm-project/pull/132991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
@@ -183,9 +195,26 @@ class Action : public clang::ASTFrontendAction { auto Results = analyze(AST.Roots, PP.MacroReferences, PP.Includes, &PI, getCompilerInstance().getPreprocessor(), HeaderFilter); -if (!Insert) + +if (!Insert) { + llvm:

[clang] 01e0296 - [clang] Temporarily silence noisy warning for FPEvalMethod

2025-04-30 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2025-04-30T09:39:19-04:00 New Revision: 01e029602a8ae860852ad2dd8c6ea347c9200066 URL: https://github.com/llvm/llvm-project/commit/01e029602a8ae860852ad2dd8c6ea347c9200066 DIFF: https://github.com/llvm/llvm-project/commit/01e029602a8ae860852ad2dd8c6ea347c9200066.diff LO

[clang] [llvm] [mlir] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/137958 >From 2d3db51939ec6ca2dfb2e327bce0f33bd2532ff9 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 30 Apr 2025 13:00:19 +0200 Subject: [PATCH 1/2] [IR] Do not store Function inside BlockAddress Currently Block

[clang] [C] Modify -Wdefault-const-init (PR #137961)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman updated https://github.com/llvm/llvm-project/pull/137961 >From d331697715977eca37197f25bac31b4724ffefee Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 30 Apr 2025 08:57:48 -0400 Subject: [PATCH 1/2] [C] Modify -Wdefault-const-init Post-commit review fee

[clang] [clang][bytecode] Only print ptr/reference types via toAPValue() (PR #137965)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Otherwise, convert them to an RValue to print them. This fixes the printing of e.g. complex values. --- Full diff: https://github.com/llvm/llvm-project/pull/137965.diff 2 Files Affected: - (modified) clan

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 >From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001 From: hulxv Date: Tue, 25 Mar 2025 22:56:51 +0200 Subject: [PATCH 01/11] [include-cleaner] rename enabled flags to `disable-*` --- .../incl

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 >From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001 From: hulxv Date: Tue, 25 Mar 2025 22:56:51 +0200 Subject: [PATCH 01/10] [include-cleaner] rename enabled flags to `disable-*` --- .../incl

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-30 Thread St. Muench via cfe-commits
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc, stmuench wrote: I tried to implement it this way at first but unfortunately the

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
https://github.com/hulxv updated https://github.com/llvm/llvm-project/pull/132991 >From c476948593a80ed31765cdd711a626e4e03930ab Mon Sep 17 00:00:00 2001 From: hulxv Date: Tue, 25 Mar 2025 22:56:51 +0200 Subject: [PATCH 1/9] [include-cleaner] rename enabled flags to `disable-*` --- .../includ

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
hulxv wrote: @AaronBallman Do you think we need to work on something in CommandLine to make the deprecation of commands easier and standardised for all tools? https://github.com/llvm/llvm-project/pull/132991 ___ cfe-commits mailing list cfe-commits@li

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-30 Thread St. Muench via cfe-commits
@@ -39,6 +39,30 @@ AST_MATCHER(clang::ParmVarDecl, isArgvOfMain) { return FD ? FD->isMain() : false; } +bool isWithinImplicitTemplateInstantiation(const TypeLoc *MatchedTypeLoc, stmuench wrote: > Could you please elaborate what is this function for? I delet

[clang] [clang] Mark constructors with invalid initializers as invalid (PR #137773)

2025-04-30 Thread Timm Baeder via cfe-commits
@@ -2,16 +2,20 @@ // RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++98 %s // RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++11 %s -class A { +class A { + // expected-note@-1 {{candidate constructor}} +#if __cplusplus >= 201103L // C++11 or later + // expec

[clang] [clang][bytecode] Only print ptr/reference types via toAPValue() (PR #137965)

2025-04-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137965 Otherwise, convert them to an RValue to print them. This fixes the printing of e.g. complex values. Rate limit · GitHub body { background-color: #f6f8fa;

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Do you need me to land the changes on your behalf? https://github.com/llvm/llvm-project/pull/132991 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman Do you think we need to work on something in CommandLine to > make the deprecation of commands easier and standardised for all tools? It might be nice, but isn't a requirement for this patch. We don't deprecate command line options too often, so it may not b

[clang] c2a62af - [clang] Another Wpreferred-type-bitfield-enum-conversion suppression fix!

2025-04-30 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2025-04-30T10:08:45-04:00 New Revision: c2a62af2a51d58183bcd72ee8a86c37ddd526758 URL: https://github.com/llvm/llvm-project/commit/c2a62af2a51d58183bcd72ee8a86c37ddd526758 DIFF: https://github.com/llvm/llvm-project/commit/c2a62af2a51d58183bcd72ee8a86c37ddd526758.diff LO

[clang] [HLSL][RootSignature] Define and integrate rootsig clang attr and decl (PR #137690)

2025-04-30 Thread Chris B via cfe-commits
@@ -949,6 +950,23 @@ void SemaHLSL::emitLogicalOperatorFixIt(Expr *LHS, Expr *RHS, << NewFnName << FixItHint::CreateReplacement(FullRange, OS.str()); } +void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) { + if (AL.getNumArgs() != 1) { +Diag(AL.g

[clang] [llvm] [PowerPC] frontend get target feature from backend with cpu name (PR #137670)

2025-04-30 Thread zhijian lin via cfe-commits
https://github.com/diggerlin updated https://github.com/llvm/llvm-project/pull/137670 >From 97f10e6a0fb4c158359e79e24650f8fdf4d23ef2 Mon Sep 17 00:00:00 2001 From: zhijian Date: Fri, 25 Apr 2025 13:09:47 + Subject: [PATCH 1/3] implement getting target features from backend for clang fronte

[clang] Ensure bit-fields storing FPEvalMethodKind are wide enough to do so (PR #136515)

2025-04-30 Thread Nico Weber via cfe-commits
nico wrote: > After landing #116760 After landing #116785, right? https://github.com/llvm/llvm-project/pull/136515 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Add diagnostic + attr for unterminated strings (PR #137829)

2025-04-30 Thread Aaron Ballman via cfe-commits
@@ -5024,3 +5024,9 @@ def OpenACCRoutineDecl :InheritableAttr { void printPrettyPragma(raw_ostream &OS, const PrintingPolicy &Policy) const; }]; } + +def NonString : InheritableAttr { + let Spellings = [GCC<"nonstring">]; AaronBallman wrote: We don't t

[clang-tools-extra] [include-cleaner] rename enabled flags to `disable-*` (PR #132991)

2025-04-30 Thread Mohamed Emad via cfe-commits
@@ -183,9 +195,26 @@ class Action : public clang::ASTFrontendAction { auto Results = analyze(AST.Roots, PP.MacroReferences, PP.Includes, &PI, getCompilerInstance().getPreprocessor(), HeaderFilter); -if (!Insert) + +if (!Insert) { + llvm:

[clang] [clang] Remove FEM_Indeterminable (PR #137661)

2025-04-30 Thread Zahira Ammarguellat via cfe-commits
zahiraam wrote: > > > > > > @zahiraam @AaronBallman a different option would be to add a signed > > > > > > vs unsigned storage option to the `OPTION` and > > > > > > `BENIGN_ENUM_LANGOPT` macros so we can store negative enumerations > > > > > > safely > > > > > > > > > > > > > > > I think I

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. I'm happy once Andy is. https://github.com/llvm/llvm-project/pull/137184 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-30 Thread Urvi Rav via cfe-commits
ravurvi20 wrote: Thankyou. Updated OpenMPSupport.rst file. https://github.com/llvm/llvm-project/pull/128640 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Clean up unnecessary #undef __CLC_BODYs (PR #137959)

2025-04-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/137959 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C] Modify -Wdefault-const-init (PR #137961)

2025-04-30 Thread Mariya Podchishchaeva via cfe-commits
@@ -1,28 +1,23 @@ -// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wdefault-const-init %s -// RUN: %clang_cc1 -fsyntax-only -verify=c,unsafe -Wc++-compat %s -// RUN: %clang_cc1 -fsyntax-only -verify=unsafe %s -// RUN: %clang_cc1 -fsyntax-only -verify=c -Wdefault-const-init -Wn

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Yingwei Zheng via cfe-commits
@@ -912,6 +912,11 @@ class BlockAddress final : public Constant { /// block must be embedded into a function. static BlockAddress *get(BasicBlock *BB); + /// Return a BlockAddress for the specified basic block, which may not be + /// part of a function. The specified typ

[clang] Fix crash when an attribute is applied to pragma attribute/pragma dump (PR #137880)

2025-04-30 Thread Erich Keane via cfe-commits
https://github.com/erichkeane updated https://github.com/llvm/llvm-project/pull/137880 >From be6d7e3fcf4ef53bdf0dce7ff1b541f9de33c81f Mon Sep 17 00:00:00 2001 From: erichkeane Date: Tue, 29 Apr 2025 14:32:32 -0700 Subject: [PATCH 1/2] Fix crash when an attribute is applied to pragma attribute/

[clang] Fix crash when an attribute is applied to pragma attribute/pragma dump (PR #137880)

2025-04-30 Thread Erich Keane via cfe-commits
@@ -526,10 +526,14 @@ StmtResult Parser::ParseStatementOrDeclarationAfterAttributes( return ParsePragmaLoopHint(Stmts, StmtCtx, TrailingElseLoc, CXX11Attrs); case tok::annot_pragma_dump: +ProhibitAttributes(CXX11Attrs); erichkeane wrote: No, both o

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Matt Arsenault via cfe-commits
@@ -912,6 +912,11 @@ class BlockAddress final : public Constant { /// block must be embedded into a function. static BlockAddress *get(BasicBlock *BB); + /// Return a BlockAddress for the specified basic block, which may not be + /// part of a function. The specified typ

[clang] 1a14ef1 - [clang] Temporarily silence noisy warning for FPEvalMethod in another place

2025-04-30 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2025-04-30T09:53:14-04:00 New Revision: 1a14ef1c89bf4632bf25a959142770f190dcaaf1 URL: https://github.com/llvm/llvm-project/commit/1a14ef1c89bf4632bf25a959142770f190dcaaf1 DIFF: https://github.com/llvm/llvm-project/commit/1a14ef1c89bf4632bf25a959142770f190dcaaf1.diff LO

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/137958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Matt Arsenault via cfe-commits
@@ -1688,8 +1688,7 @@ class LLVMContextImpl { StringMap> CDSConstants; - DenseMap, BlockAddress *> - BlockAddresses; + DenseMap BlockAddresses; arsenm wrote: I'm working on moving this out of the LLVMContext https://github.com/llvm/llvm-project/pu

[clang] [llvm] [IR] Do not store Function inside BlockAddress (PR #137958)

2025-04-30 Thread Matt Arsenault via cfe-commits
@@ -920,8 +925,8 @@ class BlockAddress final : public Constant { /// Transparently provide more efficient getOperand methods. DECLARE_TRANSPARENT_OPERAND_ACCESSORS(Value); - Function *getFunction() const { return (Function *)Op<0>().get(); } - BasicBlock *getBasicBlock()

[clang] [llvm] [HLSL] Run finalize linkage pass for all targets (PR #134260)

2025-04-30 Thread Steven Perron via cfe-commits
https://github.com/s-perron closed https://github.com/llvm/llvm-project/pull/134260 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL][AMDGPU] OpenCL Kernel stubs should be assigned alwaysinline attribute (PR #137769)

2025-04-30 Thread Matt Arsenault via cfe-commits
arsenm wrote: > Why do you think it is an internal function? I thought it's an externally > callable stub. Yes at construction, but in the real optimization pipeline it will be internalized https://github.com/llvm/llvm-project/pull/137769 ___ cfe-c

[clang] 1b7d8b2 - [clang] prevent -Wunknown-warning-option with older clangs

2025-04-30 Thread Nico Weber via cfe-commits
Author: Nico Weber Date: 2025-04-30T09:56:52-04:00 New Revision: 1b7d8b2ee66672c5226f2a8d6b72b025070d9ede URL: https://github.com/llvm/llvm-project/commit/1b7d8b2ee66672c5226f2a8d6b72b025070d9ede DIFF: https://github.com/llvm/llvm-project/commit/1b7d8b2ee66672c5226f2a8d6b72b025070d9ede.diff LO

[clang] [clang-tools-extra] [compiler-rt] [clang-tidy] add `ctime` and `localtime` to `clang-tidy` (PR #110366)

2025-04-30 Thread Zishan Mirza via cfe-commits
https://github.com/zimirza updated https://github.com/llvm/llvm-project/pull/110366 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[libclc] [libclc] Skip opt command if opt_flags is empty (PR #130882)

2025-04-30 Thread Wenju He via cfe-commits
wenju-he wrote: close this PR. Original intention of disabling opt -O3 on downstream project was changed. https://github.com/llvm/llvm-project/pull/130882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[libclc] [libclc] Skip opt command if opt_flags is empty (PR #130882)

2025-04-30 Thread Wenju He via cfe-commits
https://github.com/wenju-he closed https://github.com/llvm/llvm-project/pull/130882 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [TargetParser] Fix flaky installs of generated headers (PR #137853)

2025-04-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lld-x86_64-win` running on `as-worker-93` while building `clang,llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2814 Here is the releva

[libclc] [libclc] Add v3 variants of async_work_group_copy/async_work_group_strided_copy/prefetch (PR #137932)

2025-04-30 Thread Wenju He via cfe-commits
wenju-he wrote: @frasercrmck please help to review, thanks https://github.com/llvm/llvm-project/pull/137932 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] [SEH] Implement parsing of aarch64 pdata/xdata (PR #137949)

2025-04-30 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/137949 This is needed for forced unwind, for some testcases in libunwind/libcxxabi. This adds an aarch64 case for extracting the LanguageHandler and HandlerData fields from unwind info, in UnwindCursor::getInfoFromSE

[libunwind] [libunwind] [SEH] Implement parsing of aarch64 pdata/xdata (PR #137949)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Martin Storsjö (mstorsjo) Changes This is needed for forced unwind, for some testcases in libunwind/libcxxabi. This adds an aarch64 case for extracting the LanguageHandler and HandlerData fields from unwind info, in UnwindCursor::getI

[libunwind] [libunwind] [SEH] Implement parsing of ARM pdata/xdata (PR #137950)

2025-04-30 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/137950 This is generally very similar to the aarch64 case. Contrary to aarch64, the public headers don't contain any definition of a struct for interpreting this data, so we provide our own. From 8a03c40961c30bc7a73

[libunwind] [libunwind] [SEH] Implement parsing of ARM pdata/xdata (PR #137950)

2025-04-30 Thread via cfe-commits
Martin =?utf-8?q?Storsjö?= Message-ID: In-Reply-To: llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Martin Storsjö (mstorsjo) Changes This is generally very similar to the aarch64 case. Contrary to aarch64, the public headers don't contain any definition of a struct for interpre

[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)

2025-04-30 Thread Martin Storsjö via cfe-commits
https://github.com/mstorsjo created https://github.com/llvm/llvm-project/pull/137951 The CRT __C_specific_handler function uses this for restoring registers before calling the filter function. This fixes the libunwind/libcxxabi forced unwind testcases on ARM and AArch64. From 27b7d0e7946fd030

[libunwind] [libunwind] [SEH] Implement parsing of ARM pdata/xdata (PR #137950)

2025-04-30 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: This goes on top of #137949. https://github.com/llvm/llvm-project/pull/137950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)

2025-04-30 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: Together with #137949 and #137950, this makes `check-cxxabi` and `check-unwind` pass on aarch64 and arm. https://github.com/llvm/llvm-project/pull/137951 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cg

[libunwind] [libunwind] [SEH] Set NonVolatileRegisters before calling a personality function (PR #137951)

2025-04-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Martin Storsjö (mstorsjo) Changes The CRT __C_specific_handler function uses this for restoring registers before calling the filter function. This fixes the libunwind/libcxxabi forced unwind testcases on ARM and AArch64. --- Full dif

[clang] f2b8539 - [C2y] Correctly handle 0 in the preprocessor (#137844)

2025-04-30 Thread via cfe-commits
Author: Aaron Ballman Date: 2025-04-30T06:55:20-04:00 New Revision: f2b8539803ea5887a9653d26cdcacaabd536ae1c URL: https://github.com/llvm/llvm-project/commit/f2b8539803ea5887a9653d26cdcacaabd536ae1c DIFF: https://github.com/llvm/llvm-project/commit/f2b8539803ea5887a9653d26cdcacaabd536ae1c.diff

[clang] [C2y] Correctly handle 0 in the preprocessor (PR #137844)

2025-04-30 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/137844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Mark constructors with invalid initializers as invalid (PR #137773)

2025-04-30 Thread Aaron Ballman via cfe-commits
@@ -2,16 +2,20 @@ // RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++98 %s // RUN: %clang_cc1 -Wreorder -fsyntax-only -verify -std=c++11 %s -class A { +class A { + // expected-note@-1 {{candidate constructor}} +#if __cplusplus >= 201103L // C++11 or later + // expec

[clang] default clause replaced by otherwise clause for metadirective in OpenMP 5.2 (PR #128640)

2025-04-30 Thread Urvi Rav via cfe-commits
https://github.com/ravurvi20 updated https://github.com/llvm/llvm-project/pull/128640 >From 6ebd5991788608fbd104ea9c23230912044462d3 Mon Sep 17 00:00:00 2001 From: Urvi Rav Date: Tue, 25 Feb 2025 00:49:07 -0600 Subject: [PATCH 1/7] default clause replaced by otherwise clause for metadirective

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-30 Thread St. Muench via cfe-commits
https://github.com/stmuench updated https://github.com/llvm/llvm-project/pull/132924 >From fb9f0c3db8609645588692eecc294407f48c1c34 Mon Sep 17 00:00:00 2001 From: stmuench Date: Tue, 25 Mar 2025 12:38:53 +0100 Subject: [PATCH] [clang-tidy] do not diagn. array types in implicit templ. instantia

  1   2   3   4   5   6   >