[clang] [libclang/python] Add isFunctionInlined support (PR #162882)

2025-10-22 Thread Vlad Serebrennikov via cfe-commits
@@ -4308,6 +4315,7 @@ def set_property(self, property, value): ("clang_Cursor_isAnonymous", [Cursor], bool), ("clang_Cursor_isAnonymousRecordDecl", [Cursor], bool), ("clang_Cursor_isBitField", [Cursor], bool), +("clang_Cursor_isFunctionInlined", [Cursor], bool),

[clang-tools-extra] [clang-tidy][NFC] Clarify switch-missing-default-case doc (#164699) (PR #164709)

2025-10-22 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp approved this pull request. https://github.com/llvm/llvm-project/pull/164709 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Fix CXXConstructExpr for multidim arrays (PR #164760)

2025-10-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes This is a thing apparently. Fixes https://github.com/llvm/llvm-project/issues/153803 --- Full diff: https://github.com/llvm/llvm-project/pull/164760.diff 2 Files Affected: - (modified) clang/lib/AST/ByteC

[clang] [clang][bytecode] Fix CXXConstructExpr for multidim arrays (PR #164760)

2025-10-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/164760 This is a thing apparently. Fixes https://github.com/llvm/llvm-project/issues/153803 >From ef0dcb70e2a608ab218f4e1216b7a33254879327 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 23 O

[clang] [clang-tools-extra] [clang-tidy] Add new check: `readability-redundant-typename` (PR #161574)

2025-10-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/161574 >From 82c842a3e8f0f2e9dcfacca0eada9f6aeacd38d8 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Wed, 1 Oct 2025 18:35:35 + Subject: [PATCH 01/27] [clang-tidy] Add new check: `readability-redundant-

[clang] [clang][bytecode] Fix instance pointer in IndirectFieldDecl inits (PR #164751)

2025-10-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Points to the first chain link in this case. --- Full diff: https://github.com/llvm/llvm-project/pull/164751.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+48-42) - (modified) c

[clang] [clang][bytecode] Fix instance pointer in IndirectFieldDecl inits (PR #164751)

2025-10-22 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/164751 Points to the first chain link in this case. >From 3dd4f74c46d0bd990829d32e9087ce96adba074e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 23 Oct 2025 06:52:34 +0200 Subject: [PATCH] [

[clang] Revert "[clang-format] Annotate ::operator and Foo::operator correctly" (PR #164670)

2025-10-22 Thread via cfe-commits
owenca wrote: @Prabhuk I've reverted your revert. Please open a GitHub issue for your use case, which also failed before #15 was merged. https://github.com/llvm/llvm-project/pull/164670 ___ cfe-commits mailing list [email protected] https

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
erichkeane wrote: FWIW: I'd MUCH rather we limit the scope of this as much as possible (and all followups). Listing reflection as experimental, and leaving the 'not yet implementeds' in place are MUCH better idea than growing this already large patch. If reflection is 'experimental' anything

[clang] [Clang][OpenMP]Default clause variable category (PR #157063)

2025-10-22 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/157063 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] Add new check: `readability-redundant-typename` (PR #161574)

2025-10-22 Thread Yanzuo Liu via cfe-commits
zwuis wrote: LGTM if we add some tests with deduction guides. https://github.com/llvm/llvm-project/pull/161574 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] SFINAE context refactor (PR #164703)

2025-10-22 Thread Younan Zhang via cfe-commits
@@ -517,6 +517,8 @@ AMDGPUMaxNumWorkGroupsAttr *SemaAMDGPU::CreateAMDGPUMaxNumWorkGroupsAttr( const AttributeCommonInfo &CI, Expr *XExpr, Expr *YExpr, Expr *ZExpr) { ASTContext &Context = getASTContext(); AMDGPUMaxNumWorkGroupsAttr TmpAttr(Context, CI, XExpr, YExpr, ZE

[clang] [clang] SFINAE context refactor (PR #164703)

2025-10-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/164703 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] SFINAE context refactor (PR #164703)

2025-10-22 Thread Younan Zhang via cfe-commits
@@ -3914,10 +3902,10 @@ static TemplateDeductionResult instantiateExplicitSpecifierDeferred( Sema::InstantiatingTemplate Inst( S, Info.getLocation(), FunctionTemplate, DeducedArgs, - Sema::CodeSynthesisContext::DeducedTemplateArgumentSubstitution, Info); + S

[clang] [clang] SFINAE context refactor (PR #164703)

2025-10-22 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks for the improvement https://github.com/llvm/llvm-project/pull/164703 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] SFINAE context refactor (PR #164703)

2025-10-22 Thread Younan Zhang via cfe-commits
@@ -12394,45 +12391,65 @@ class Sema final : public SemaBase { /// failures rather than hard errors. bool AccessCheckingSFINAE; + class SFINAETrap; + + struct SFINAEContextBase { +SFINAEContextBase(Sema &S, SFINAETrap *Cur) +: S(S), Prev(std::exchange(S.Curre

[clang] [HLSL] Enable InitList code to handle zero sized structs (PR #160355)

2025-10-22 Thread Shafik Yaghmour via cfe-commits
@@ -4284,6 +4284,9 @@ bool SemaHLSL::transformInitList(const InitializedEntity &Entity, } size_t ExpectedSize = ILT.DestTypes.size(); size_t ActualSize = ILT.ArgExprs.size(); + if (ExpectedSize == 0 && ActualSize == 0) shafik wrote: So this check is a

[clang] [Clang] Add vector gather / scatter builtins to clang (PR #157895)

2025-10-22 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/157895 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add vector gather / scatter builtins to clang (PR #157895)

2025-10-22 Thread Joseph Huber via cfe-commits
@@ -2361,6 +2363,101 @@ static ExprResult BuiltinMaskedStore(Sema &S, CallExpr *TheCall) { return TheCall; } +static ExprResult BuiltinMaskedGather(Sema &S, CallExpr *TheCall) { + if (S.checkArgCountRange(TheCall, 3, 4)) +return ExprError(); + + Expr *MaskArg = TheCal

[clang] [Clang] Add vector gather / scatter builtins to clang (PR #157895)

2025-10-22 Thread Shafik Yaghmour via cfe-commits
@@ -2361,6 +2363,101 @@ static ExprResult BuiltinMaskedStore(Sema &S, CallExpr *TheCall) { return TheCall; } +static ExprResult BuiltinMaskedGather(Sema &S, CallExpr *TheCall) { + if (S.checkArgCountRange(TheCall, 3, 4)) +return ExprError(); + + Expr *MaskArg = TheCal

[clang] [clang-tools-extra] [clang-tidy] Add new check: `readability-redundant-typename` (PR #161574)

2025-10-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/161574 >From 82c842a3e8f0f2e9dcfacca0eada9f6aeacd38d8 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Wed, 1 Oct 2025 18:35:35 + Subject: [PATCH 01/24] [clang-tidy] Add new check: `readability-redundant-

[clang] [llvm] [OpenMP][clang] Set num_threads 'strict' to unsupported on GPUs (PR #160659)

2025-10-22 Thread Shafik Yaghmour via cfe-commits
@@ -2713,11 +2714,13 @@ llvm::Value * CGOpenMPRuntime::emitMessageClause(CodeGenFunction &CGF, const OMPMessageClause *MessageClause) { return emitMessageClause( - CGF, MessageClause ? MessageClause->getMessageString() : nullptr); +

[clang] [clang-tools-extra] [clang-tidy] Add new check: `readability-redundant-typename` (PR #161574)

2025-10-22 Thread Victor Chernyakin via cfe-commits
localspook wrote: Gentle ping. Since this is a new check, it would be especially good to get a second review. (Ignore the close and reopen. I messed up my git push so badly that GitHub closed the PR, whoops...) https://github.com/llvm/llvm-project/pull/161574 _

[clang] [clang-tools-extra] [clang-tidy] Add new check: `readability-redundant-typename` (PR #161574)

2025-10-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook updated https://github.com/llvm/llvm-project/pull/161574 >From 82c842a3e8f0f2e9dcfacca0eada9f6aeacd38d8 Mon Sep 17 00:00:00 2001 From: Victor Chernyakin Date: Wed, 1 Oct 2025 18:35:35 + Subject: [PATCH 01/23] [clang-tidy] Add new check: `readability-redundant-

[clang] [clang-tools-extra] [clang-tidy] Add new check: `readability-redundant-typename` (PR #161574)

2025-10-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook reopened https://github.com/llvm/llvm-project/pull/161574 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add intrinsics for v_[pk]_add_{min|max}_* instructions (PR #164731)

2025-10-22 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec closed https://github.com/llvm/llvm-project/pull/164731 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 9b5bc98 - [AMDGPU] Add intrinsics for v_[pk]_add_{min|max}_* instructions (#164731)

2025-10-22 Thread via cfe-commits
Author: Stanislav Mekhanoshin Date: 2025-10-22T17:46:33-07:00 New Revision: 9b5bc987435d084583ba894f5fc8676401f4ae0f URL: https://github.com/llvm/llvm-project/commit/9b5bc987435d084583ba894f5fc8676401f4ae0f DIFF: https://github.com/llvm/llvm-project/commit/9b5bc987435d084583ba894f5fc8676401f4ae

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -1939,6 +1939,43 @@ TypeTraitExpr *TypeTraitExpr::CreateDeserialized(const ASTContext &C, return new (Mem) TypeTraitExpr(EmptyShell(), IsStoredAsBool); } +CXXReflectExpr::CXXReflectExpr(const ASTContext &C, QualType T, QualType Ty) +: Expr(CXXReflectExprClass, T, VK_

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -1939,6 +1939,43 @@ TypeTraitExpr *TypeTraitExpr::CreateDeserialized(const ASTContext &C, return new (Mem) TypeTraitExpr(EmptyShell(), IsStoredAsBool); } +CXXReflectExpr::CXXReflectExpr(const ASTContext &C, QualType T, QualType Ty) +: Expr(CXXReflectExprClass, T, VK_

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread via cfe-commits
@@ -2164,6 +2164,11 @@ StmtProfiler::VisitLambdaExpr(const LambdaExpr *S) { ID.AddInteger(Hasher.CalculateHash()); } +void StmtProfiler::VisitCXXReflectExpr(const CXXReflectExpr *E) { + VisitExpr(E); + // TODO: Sirraide wrote: Yes, not implementing this w

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread via cfe-commits
@@ -2566,6 +2566,11 @@ void StmtPrinter::VisitCXXUnresolvedConstructExpr( OS << ')'; } +void StmtPrinter::VisitCXXReflectExpr(CXXReflectExpr *S) { + // TODO: Make this better. + OS << "^(...)"; Sirraide wrote: Printing this *shouldn’t* be too complicate

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread via cfe-commits
@@ -4945,6 +4945,12 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, E = cast(E)->getSubExpr(); goto recurse; + case Expr::CXXReflectExprClass: { +// TODO: implement this after introducing std::meta::info Sirraide wrote: I

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Nhat Nguyen via cfe-commits
@@ -1208,6 +1208,13 @@ Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, AllowSuffix = false; Res = ParseUnaryExprOrTypeTraitExpression(); break; + case tok::caretcaret: { +if (getLangOpts().Reflection) { changkhoth

[clang] [CIR] Handle overlapping values in constant init expressions (PR #164508)

2025-10-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/164508 >From 08353a39097576500fa3516b121c87e7711d30b7 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 21 Oct 2025 15:17:45 -0700 Subject: [PATCH 1/2] [CIR] Handle overlapping values in constant init expressio

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread via cfe-commits
@@ -380,6 +380,8 @@ FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus && LangOpts.RelativeCXXABIVT FEATURE(clang_atomic_attributes, true) +FEATURE(reflection, LangOpts.Reflection) Sirraide wrote: Yeah, I don’t think we should have a flag for this given th

[clang] [CIR] Add support for exact dynamic casts (PR #164007)

2025-10-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/164007 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 095c178 - [CIR] Add support for exact dynamic casts (#164007)

2025-10-22 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-10-22T15:47:00-07:00 New Revision: 095c178b8b1c3e8d880cb831354294fefae24aed URL: https://github.com/llvm/llvm-project/commit/095c178b8b1c3e8d880cb831354294fefae24aed DIFF: https://github.com/llvm/llvm-project/commit/095c178b8b1c3e8d880cb831354294fefae24aed.diff L

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread via cfe-commits
@@ -1848,6 +1848,11 @@ def err_placeholder_expected_auto_or_decltype_auto : Error< "expected 'auto' or 'decltype(auto)' after concept name">; } +let CategoryName = "Reflection Issue" in { +def err_cannot_reflect_operand : Error< + "cannot reflect the provided operand">; --

[clang] [HLSL] add support for HLSLAggregateSplatCast and HLSLElementwiseCast to constant expression evaluator (PR #164700)

2025-10-22 Thread Sarah Spall via cfe-commits
https://github.com/spall edited https://github.com/llvm/llvm-project/pull/164700 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] add support for HLSLAggregateSplatCast and HLSLElementwiseCast to constant expression evaluator (PR #164700)

2025-10-22 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/164700 >From 276fca41ad8e81ce4189266c20d260646d6d5f4c Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Fri, 31 Jan 2025 16:57:24 -0800 Subject: [PATCH 1/2] add support for HLSLAggregateSplatCast and HLSLElementwiseCast

[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)

2025-10-22 Thread Oliver Hunt via cfe-commits
@@ -1618,8 +1618,26 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +// In future we may want to distinguish the presence or absence of address +// discrimination, from the inability to determine the presence. For now we rely +// o

[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)

2025-10-22 Thread Oliver Hunt via cfe-commits
@@ -1618,8 +1618,26 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +// In future we may want to distinguish the presence or absence of address +// discrimination, from the inability to determine the presence. For now we rely +// o

[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)

2025-10-22 Thread Corentin Jabot via cfe-commits
@@ -1618,8 +1618,26 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +// In future we may want to distinguish the presence or absence of address +// discrimination, from the inability to determine the presence. For now we rely +// o

[clang-tools-extra] [clang-tidy][NFC] Clarify switch-missing-default-case doc (#164699) (PR #164709)

2025-10-22 Thread Keith Thompson via cfe-commits
Keith-S-Thompson wrote: Yes, the defined behavior is the same in C++ as it is in C. Quoting a draft of the ISO C++ standard, section [stmt.switch], emphasis added: > When the `switch` statement is executed, its condition is evaluated and > compared with each case constant. If one of the case c

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
erichkeane wrote: > > Can you fill in the description for this? That very much needs to be filled > > in, with context/strategy/etc. Also, did you implement this yourself, or is > > this an attempt to get Dan's implementation merged? > > Hi! Yeah let me fill in the description. I referenced Da

[clang] [HLSL] Add matrix constructors using initalizer lists (PR #162743)

2025-10-22 Thread Chris B via cfe-commits
@@ -1877,6 +1887,34 @@ void InitListChecker::CheckReferenceType(const InitializedEntity &Entity, AggrDeductionCandidateParamTypes->push_back(DeclType); } +void InitListChecker::CheckMatrixType(const InitializedEntity &Entity, + InitLis

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -529,6 +529,10 @@ void ASTStmtReader::VisitCapturedStmt(CapturedStmt *S) { } } +void ASTStmtReader::VisitCXXReflectExpr(CXXReflectExpr *E) { + llvm_unreachable("unimplemented"); katzdm wrote: Note that this is needed for modules (e.g., importing an `inf

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -2164,6 +2164,11 @@ StmtProfiler::VisitLambdaExpr(const LambdaExpr *S) { ID.AddInteger(Hasher.CalculateHash()); } +void StmtProfiler::VisitCXXReflectExpr(const CXXReflectExpr *E) { + VisitExpr(E); + // TODO: katzdm wrote: Consider implementing this now

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -1208,6 +1208,13 @@ Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, AllowSuffix = false; Res = ParseUnaryExprOrTypeTraitExpression(); break; + case tok::caretcaret: { +if (getLangOpts().Reflection) { katzdm wro

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -2883,6 +2883,8 @@ DEF_TRAVERSE_STMT(CXXUnresolvedConstructExpr, { TRY_TO(TraverseTypeLoc(S->getTypeSourceInfo()->getTypeLoc())); }) +DEF_TRAVERSE_STMT(CXXReflectExpr, {/*TODO*/}) katzdm wrote: I might be mis-remembering, but I think this is used by `Tre

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -50,6 +50,13 @@ ExprResult Parser::ParseCXXReflectExpression(SourceLocation OpLoc) { return ExprError(); TypeSourceInfo *TSI = nullptr; +QualType QT = Actions.GetTypeFromParser(TR.get(), &TSI); + +if (QT.isNull()) + return ExprError(); + +if (!TS

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -0,0 +1,21 @@ +// RUN: %clang_cc1 %s -std=c++23 -freflection katzdm wrote: Should probably be `-std=c++26`. https://github.com/llvm/llvm-project/pull/164692 ___ cfe-commits mailing list [email protected] ht

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -380,6 +380,8 @@ FEATURE(cxx_abi_relative_vtable, LangOpts.CPlusPlus && LangOpts.RelativeCXXABIVT FEATURE(clang_atomic_attributes, true) +FEATURE(reflection, LangOpts.Reflection) katzdm wrote: @cor3ntin Just want to confirm that we want the feature flag;

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -2566,6 +2566,11 @@ void StmtPrinter::VisitCXXUnresolvedConstructExpr( OS << ')'; } +void StmtPrinter::VisitCXXReflectExpr(CXXReflectExpr *S) { + // TODO: Make this better. + OS << "^(...)"; katzdm wrote: Lol now might be the time to make it better 😂

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -1848,6 +1848,11 @@ def err_placeholder_expected_auto_or_decltype_auto : Error< "expected 'auto' or 'decltype(auto)' after concept name">; } +let CategoryName = "Reflection Issue" in { +def err_cannot_reflect_operand : Error< + "cannot reflect the provided operand">; --

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -4945,6 +4945,12 @@ void CXXNameMangler::mangleExpression(const Expr *E, unsigned Arity, E = cast(E)->getSubExpr(); goto recurse; + case Expr::CXXReflectExprClass: { +// TODO: implement this after introducing std::meta::info katzdm wrote: @co

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -5493,6 +5493,55 @@ class BuiltinBitCastExpr final } }; +/// Represents a C++2c reflect expression (P2996). katzdm wrote: Change "C++2c" to "C++26". Remove reference to "P2996". https://github.com/llvm/llvm-project/pull/164692 __

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Daniel M. Katz via cfe-commits
@@ -5493,6 +5493,55 @@ class BuiltinBitCastExpr final } }; +/// Represents a C++2c reflect expression (P2996). +class CXXReflectExpr : public Expr { + + // Source locations. + SourceLocation OperatorLoc; + SourceRange OperandRange; + + CXXReflectExpr(const ASTContext &C,

[clang] [compiler-rt] [llvm] [SPARC] Properly handle CC for long double on sparc32 (PR #162226)

2025-10-22 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: I think it's something like that? Not confident; haven't touched this in a while. https://github.com/llvm/llvm-project/pull/162226 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/li

[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)

2025-10-22 Thread Oliver Hunt via cfe-commits
@@ -1618,8 +1618,26 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +// In future we may want to distinguish the presence or absence of address +// discrimination, from the inability to determine the presence. For now we rely +// o

[clang] [CIR] Add support for exact dynamic casts (PR #164007)

2025-10-22 Thread Andy Kaylor via cfe-commits
andykaylor wrote: > @andykaylor are you on discord at all? Yes, I'm also andykaylor on Discord. https://github.com/llvm/llvm-project/pull/164007 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -1208,6 +1208,13 @@ Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, AllowSuffix = false; Res = ParseUnaryExprOrTypeTraitExpression(); break; + case tok::caretcaret: { +if (getLangOpts().Reflection) { + SourceLocation First

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -499,6 +498,7 @@ LANGOPT(BoundsSafety, 1, 0, NotCompatible, "Bounds safety extension for C") LANGOPT(EnableLifetimeSafety, 1, 0, NotCompatible, "Experimental lifetime safety analysis for C++") LANGOPT(PreserveVec3Type, 1, 0, NotCompatible, "Preserve 3-component vector ty

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -5501,6 +5493,55 @@ class BuiltinBitCastExpr final } }; +/// Represents a C++2c reflect expression (P2996). +class CXXReflectExpr : public Expr { + + // Source locations. + SourceLocation OperatorLoc; + SourceRange OperandRange; + + CXXReflectExpr(const ASTContext &C,

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -1848,6 +1848,11 @@ def err_placeholder_expected_auto_or_decltype_auto : Error< "expected 'auto' or 'decltype(auto)' after concept name">; } +let CategoryName = "Reflection Issue" in { +def err_cannot_reflect_operand : Error< + "cannot reflect the provided operand">; --

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -7189,7 +7158,7 @@ defm android_pad_segment : BooleanFFlag<"android-pad-segment">, Group; def shared_libflangrt : Flag<["-"], "shared-libflangrt">, HelpText<"Link the flang-rt shared library">, Group, Visibility<[FlangOption]>, Flags<[NoArgumentUnused]>; -def static_lib

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -5501,6 +5493,55 @@ class BuiltinBitCastExpr final } }; +/// Represents a C++2c reflect expression (P2996). +class CXXReflectExpr : public Expr { + + // Source locations. + SourceLocation OperatorLoc; + SourceRange OperandRange; + + CXXReflectExpr(const ASTContext &C,

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -1208,6 +1208,13 @@ Parser::ParseCastExpression(CastParseKind ParseKind, bool isAddressOfOperand, AllowSuffix = false; Res = ParseUnaryExprOrTypeTraitExpression(); break; + case tok::caretcaret: { +if (getLangOpts().Reflection) { erichkeane

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -3689,6 +3663,11 @@ defm application_extension : BoolFOption<"application-extension", PosFlag, NegFlag>; +defm reflection : BoolFOption<"reflection", erichkeane wrote: Again, we should decide which versions we want this enabled for, but I don't think j

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -4348,6 +4348,9 @@ bool Lexer::LexTokenInternal(Token &Result, bool TokAtPhysicalStartOfLine) { if (Char == '=') { CurPtr = ConsumeChar(CurPtr, SizeTmp, Result); Kind = tok::caretequal; +} else if (LangOpts.Reflection && Char == '^') { e

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
@@ -5501,6 +5493,55 @@ class BuiltinBitCastExpr final } }; +/// Represents a C++2c reflect expression (P2996). +class CXXReflectExpr : public Expr { erichkeane wrote: Can you document this better? This comment seems outdated? https://github.com/llvm/llvm-

[clang] [CIR] Handle overlapping values in constant init expressions (PR #164508)

2025-10-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/164508 >From 2fc5062288107c26e038f4d52cd1f522fe1c7c53 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 21 Oct 2025 15:17:45 -0700 Subject: [PATCH 1/2] [CIR] Handle overlapping values in constant init expressio

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Nhat Nguyen via cfe-commits
changkhothuychung wrote: > Can you fill in the description for this? That very much needs to be filled > in, with context/strategy/etc. Also, did you implement this yourself, or is > this an attempt to get Dan's implementation merged? Hi! Yeah let me fill in the description. I referenced Dan's

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/164692 >From 482e25e9ba7994194f564d3c5f34e57bc818ebf0 Mon Sep 17 00:00:00 2001 From: changkhothuychung Date: Wed, 22 Oct 2025 14:34:06 -0400 Subject: [PATCH 01/15] parsing global namespace and primitive types

[clang] [CIR] Upstream support for calling functions via member expressions (PR #164518)

2025-10-22 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/164518 >From 27fdb6b01365b537e8c317d32e7ff4da8cf656d3 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Tue, 21 Oct 2025 16:18:19 -0700 Subject: [PATCH 1/2] [CIR] Upstream support for calling functions via member ex

[clang-tools-extra] [clang-tidy][NFC] Clarify switch-missing-default-case doc (#164699) (PR #164709)

2025-10-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Keith Thompson (Keith-S-Thompson) Changes Falling through a defaultless switch statement has well defined behavior. Credit for noticing this problem goes to user "pozz" on comp.lang.c, Message-ID: <[email protected]> ---

[clang] [clang][DependencyScanning] Implementation of `CompilerInstanceWithContext` to Improve By-Name Queries (PR #164345)

2025-10-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/164345 >From 19482768ca28eb478cd45a7bd0ff63f6c0af55ea Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 15 Oct 2025 09:22:59 -0700 Subject: [PATCH 1/5] Inital commit of CompilerInstanceWithContext, all tests pass

[clang] [CIR] Upstream support for calling functions via member expressions (PR #164518)

2025-10-22 Thread Andy Kaylor via cfe-commits
@@ -1820,10 +1820,10 @@ CIRGenCallee CIRGenFunction::emitCallee(const clang::Expr *e) { // Resolve direct calls. const auto *funcDecl = cast(declRef->getDecl()); return emitDirectCallee(funcDecl); - } else if (isa(e)) { -cgm.errorNYI(e->getSourceRange(), -

[clang-tools-extra] [clang-tidy][NFC] Clarify switch-missing-default-case doc (#164699) (PR #164709)

2025-10-22 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [CIR] Upstream handling for __builtin_prefetch (PR #164387)

2025-10-22 Thread Shawn K via cfe-commits
https://github.com/kimsh02 updated https://github.com/llvm/llvm-project/pull/164387 >From 0b07a4aaeb2fa0f51c4700ff1047e6cda1b1543f Mon Sep 17 00:00:00 2001 From: kimsh02 Date: Tue, 21 Oct 2025 03:26:03 -0700 Subject: [PATCH 1/2] [CIR] Upstream handling for __builtin_prefetch --- clang/include

[clang-tools-extra] [clang-tidy][NFC] Clarify switch-missing-default-case doc (#164699) (PR #164709)

2025-10-22 Thread Keith Thompson via cfe-commits
https://github.com/Keith-S-Thompson created https://github.com/llvm/llvm-project/pull/164709 Falling through a defaultless switch statement has well defined behavior. Credit for noticing this problem goes to user "pozz" on comp.lang.c, Message-ID: <[email protected]> >From 28362

[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)

2025-10-22 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov edited https://github.com/llvm/llvm-project/pull/164528 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)

2025-10-22 Thread Matheus Izvekov via cfe-commits
@@ -1618,8 +1618,26 @@ void ASTContext::setRelocationInfoForCXXRecord( RelocatableClasses.insert({D, Info}); } +// In future we may want to distinguish the presence or absence of address +// discrimination, from the inability to determine the presence. For now we rely +// o

[clang] [clang-tools-extra] [clang] SFINAE context refactor (PR #164703)

2025-10-22 Thread Corentin Jabot via cfe-commits
@@ -13626,15 +13620,10 @@ class Sema final : public SemaBase { PrintInstantiationStack(getDefaultDiagFunc()); } - /// Determines whether we are currently in a context where - /// template argument substitution failures are not considered - /// errors. - /// - /// \r

[clang] [PAC][clang] Correct handling of ptrauth queries of incomplete types (PR #164528)

2025-10-22 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @AaronBallman do you have any idea how I might be able to get a field with an invalid or incomplete type without causing the containing record to be marked incomplete or invalid? https://github.com/llvm/llvm-project/pull/164528 ___ cfe-

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Erich Keane via cfe-commits
erichkeane wrote: Can you fill in the description for this? That very much needs to be filled in, with context/strategy/etc. Also, did you implement this yourself, or is this an attempt to get Dan's implementation merged? https://github.com/llvm/llvm-project/pull/164692 _

[clang] [CIR] Add support for exact dynamic casts (PR #164007)

2025-10-22 Thread Oliver Hunt via cfe-commits
ojhunt wrote: @andykaylor are you on discord at all? https://github.com/llvm/llvm-project/pull/164007 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-10-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/163686 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy][NFC] Enable `performance-unnecessary-value-param` in the codebase (PR #163686)

2025-10-22 Thread Victor Chernyakin via cfe-commits
https://github.com/localspook edited https://github.com/llvm/llvm-project/pull/163686 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/164692 >From 482e25e9ba7994194f564d3c5f34e57bc818ebf0 Mon Sep 17 00:00:00 2001 From: changkhothuychung Date: Wed, 22 Oct 2025 14:34:06 -0400 Subject: [PATCH 01/13] parsing global namespace and primitive types

[clang] [ubsan][test] Add allow-ubsan-check-divergence.c (PR #164673)

2025-10-22 Thread Thurston Dang via cfe-commits
https://github.com/thurstond closed https://github.com/llvm/llvm-project/pull/164673 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f2c235a - [ubsan][test] Add allow-ubsan-check-divergence.c (#164673)

2025-10-22 Thread via cfe-commits
Author: Thurston Dang Date: 2025-10-22T13:20:18-07:00 New Revision: f2c235a892fc36a82cb8c55790eeaca7bd693ebf URL: https://github.com/llvm/llvm-project/commit/f2c235a892fc36a82cb8c55790eeaca7bd693ebf DIFF: https://github.com/llvm/llvm-project/commit/f2c235a892fc36a82cb8c55790eeaca7bd693ebf.diff

[clang] [llvm] [openmp] [OpenMP][clang] Indirect and Virtual function call mapping from host to device (PR #159857)

2025-10-22 Thread via cfe-commits
Jason-VanBeusekom wrote: > A few comments, but this is a pretty big feature addition so it should > probably be brought up for group discussion. Unfortunately I think the next > two meetings are cancelled because it's the IWOMP conference and F2F meeting. This and https://github.com/llvm/llvm-

[clang] [CIR] Add support for exact dynamic casts (PR #164007)

2025-10-22 Thread Oliver Hunt via cfe-commits
ojhunt wrote: > @ojhunt Are you OK with this being merged in its current form. I'd like to > put off the refactoring I suggested until after the last piece of the dynamic > cast handling lands (I have one more patch waiting) so I have a stable, > working base to compare against. yup - as abov

[clang] [llvm] [OpenMP][clang] Register Vtables on device for indirect calls (PR #159856)

2025-10-22 Thread via cfe-commits
https://github.com/Jason-VanBeusekom updated https://github.com/llvm/llvm-project/pull/159856 >From e7aafa4162d216914902aab34f51db5232fc8c45 Mon Sep 17 00:00:00 2001 From: "[email protected]" Date: Fri, 12 Sep 2025 14:07:54 -0500 Subject: [PATCH 1/5] [OpenMP][clang] Register Vtables on

[clang] [HLSL] add support for HLSLAggregateSplatCast and HLSLElementwiseCast to constant expression evaluator (PR #164700)

2025-10-22 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/164700 Add support to handle these casts in the constant expression evaluator. - HLSLAggregateSplatCast - HLSLElementwiseCast - HLSLArrayRValue Add tests >From 276fca41ad8e81ce4189266c20d260646d6d5f4c Mon Sep 17 00:0

[clang] [CIR] Add support for exact dynamic casts (PR #164007)

2025-10-22 Thread Oliver Hunt via cfe-commits
https://github.com/ojhunt approved this pull request. Lgtm, no reason to block this on refactoring the path lookup logic to have a single copy. https://github.com/llvm/llvm-project/pull/164007 ___ cfe-commits mailing list [email protected] ht

[clang] [clang]: reflection operator parsing for global namespace and primitive types (PR #164692)

2025-10-22 Thread Nhat Nguyen via cfe-commits
https://github.com/changkhothuychung updated https://github.com/llvm/llvm-project/pull/164692 >From 482e25e9ba7994194f564d3c5f34e57bc818ebf0 Mon Sep 17 00:00:00 2001 From: changkhothuychung Date: Wed, 22 Oct 2025 14:34:06 -0400 Subject: [PATCH 01/11] parsing global namespace and primitive types

[clang] [clang-tools-extra] [llvm] [clang][headers] Need a way for math.h to share the definitions of INIFINITY and NAN with float.h (PR #164348)

2025-10-22 Thread Michael Spencer via cfe-commits
https://github.com/Bigcheese approved this pull request. lgtm from a modules perspective, but it would be good to have an additional approver. https://github.com/llvm/llvm-project/pull/164348 ___ cfe-commits mailing list [email protected] htt

[clang] [llvm] [FlowSensitive] [StatusOr] [5/N] Support absl::OkStatus et al (PR #163872)

2025-10-22 Thread Florian Mayer via cfe-commits
https://github.com/fmayer edited https://github.com/llvm/llvm-project/pull/163872 ___ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   >