[clang] Filter out configuration file from compile commands (PR #131099)

2025-03-13 Thread Konrad Kleine via cfe-commits
https://github.com/kwk edited https://github.com/llvm/llvm-project/pull/131099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/13] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-03-13 Thread Hank Chang via cfe-commits
https://github.com/HankChang736 closed https://github.com/llvm/llvm-project/pull/128636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-13 Thread Letu Ren via cfe-commits
https://github.com/FantasqueX updated https://github.com/llvm/llvm-project/pull/124315 >From e3f118c1435c0f87588c5c51ba01af1aa8136d1d Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52 +0800 Subject: [PATCH 01/11] [Sema] Add code completion for if constexpr C++17 supports

[clang] [Sema] Instantiate destructors for initialized members (PR #128866)

2025-03-13 Thread Maurice Heumann via cfe-commits
momo5502 wrote: > @shafik can you merge once you are happy? @shafik has already approved. the only open comment was from you @cor3ntin. judging from your comment here, I assume Iit's ok to keep the fixme and resolve the comment (if not, feel free to reopen it). https://github.com/llvm/llvm-pr

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 1/9] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RISCV

[clang] Filter out configuration file from compile command (PR #131099)

2025-03-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Konrad Kleine (kwk) Changes The commands to run the compilation when printed with `-###` shows various irrelevant lines for the perf-training. Most of them are filtered out already but when configured with `CLANG_CONFIG_FILE_SYSTEM_DIR` a

[clang] Filter out configuration file from compile command (PR #131099)

2025-03-13 Thread Konrad Kleine via cfe-commits
https://github.com/kwk edited https://github.com/llvm/llvm-project/pull/131099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Filter out configuration file from compile commands (PR #131099)

2025-03-13 Thread Konrad Kleine via cfe-commits
https://github.com/kwk edited https://github.com/llvm/llvm-project/pull/131099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Filter out configuration file from compile commands (PR #131099)

2025-03-13 Thread Konrad Kleine via cfe-commits
https://github.com/kwk updated https://github.com/llvm/llvm-project/pull/131099 >From e43271ec7438ecb78f99db134aeca274a47f6c28 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Thu, 13 Mar 2025 09:12:24 +0100 Subject: [PATCH] Filter out configuration file from compile commands The commands to

[clang] [Clang] Fixed UnresolvedLookupExpr propagating into the codegen phase (PR #124609)

2025-03-13 Thread via cfe-commits
TilakChad wrote: Hi @erichkeane https://github.com/llvm/llvm-project/pull/124609 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 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 8d1e260fc419e31bb11cb5a2f1f872a2b679d217 2c3440f10357b41e9a19ddacf63f161c58bc5f45 --e

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 Thread via cfe-commits
https://github.com/dong-miao converted_to_draft https://github.com/llvm/llvm-project/pull/131094 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 1/8] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RISCV

[clang] [Sema] Diagnose by-value copy constructors in template instantiations (PR #130866)

2025-03-13 Thread via cfe-commits
@@ -10921,8 +10921,8 @@ void Sema::CheckConstructor(CXXConstructorDecl *Constructor) { // parameters have default arguments. if (!Constructor->isInvalidDecl() && Constructor->hasOneParamOrDefaultArgs() && - Constructor->getTemplateSpecializationKind() != -

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 Thread via cfe-commits
https://github.com/dong-miao created https://github.com/llvm/llvm-project/pull/131094 This commit adds the Load/Store pair instructions (Zilsd) and Compressed Load/Store pair instructions (Zclsd). [Specification link](https://github.com/riscv/riscv-isa-manual/blob/main/src/zilsd.adoc). >From

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-13 Thread Letu Ren via cfe-commits
https://github.com/FantasqueX updated https://github.com/llvm/llvm-project/pull/124315 >From e3f118c1435c0f87588c5c51ba01af1aa8136d1d Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52 +0800 Subject: [PATCH 01/12] [Sema] Add code completion for if constexpr C++17 supports

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread via cfe-commits
@@ -888,31 +890,40 @@ bool Sema::CheckParameterPacksForExpansion( // Pack comes from another template parameter. 'S' is first // instantiated, expanding the outer pack 'Outer' to . The alias // declaration is accordingly substituted, leaving the template argum

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] Reapply "[Clang] Improve diagnostics for expansion length mismatch" (PR #121044)

2025-03-13 Thread via cfe-commits
@@ -749,132 +759,124 @@ ExprResult Sema::CheckPackExpansion(Expr *Pattern, SourceLocation EllipsisLoc, PackExpansionExpr(Context.DependentTy, Pattern, EllipsisLoc, NumExpansions); } +static bool IsUnexpandedPackExpansion(const TemplateArgument &TA) { + if (!TA.isPackExp

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-13 Thread Letu Ren via cfe-commits
https://github.com/FantasqueX updated https://github.com/llvm/llvm-project/pull/124315 >From e3f118c1435c0f87588c5c51ba01af1aa8136d1d Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52 +0800 Subject: [PATCH 01/13] [Sema] Add code completion for if constexpr C++17 supports

[clang] [Sema] Instantiate destructors for initialized members (PR #128866)

2025-03-13 Thread Maurice Heumann via cfe-commits
https://github.com/momo5502 updated https://github.com/llvm/llvm-project/pull/128866 >From d854512f165c9dfd7dec437433a7944381df5d96 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Wed, 26 Feb 2025 14:31:47 +0100 Subject: [PATCH 1/7] Instantiate destructors from initialized anonymous union

[clang] [llvm] [RISCV] Add Zilsd and Zclsd Extensions (PR #131094)

2025-03-13 Thread via cfe-commits
https://github.com/dong-miao updated https://github.com/llvm/llvm-project/pull/131094 >From bcdf9641037507b855a20a8ba5d26b127dd248e8 Mon Sep 17 00:00:00 2001 From: dong-miao Date: Sat, 4 Jan 2025 17:53:58 +0800 Subject: [PATCH 01/16] Update RISCVSystemOperands.td --- llvm/lib/Target/RISCV/RIS

[clang] [Clang][OpenCL][AMDGPU] Allow a kernel to call another kernel (PR #115821)

2025-03-13 Thread Aniket Lal via cfe-commits
@@ -498,7 +498,9 @@ CodeGenTypes::arrangeCXXConstructorCall(const CallArgList &args, /// Arrange the argument and result information for the declaration or /// definition of the given function. const CGFunctionInfo & -CodeGenTypes::arrangeFunctionDeclaration(const FunctionDecl

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-13 Thread Letu Ren via cfe-commits
FantasqueX wrote: @HighCommander4 @zyn0217 Really appreciate for your review. Thanks a lot. https://github.com/llvm/llvm-project/pull/124315 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-13 Thread Letu Ren via cfe-commits
https://github.com/FantasqueX updated https://github.com/llvm/llvm-project/pull/124315 >From e3f118c1435c0f87588c5c51ba01af1aa8136d1d Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52 +0800 Subject: [PATCH 01/16] [Sema] Add code completion for if constexpr C++17 supports

[clang] [llvm] [DirectX] Remove DXILResourceMDAnalysis (PR #130323)

2025-03-13 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 `llvm` at step 7 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/146/builds/2478 Here is the relevant pie

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-13 Thread Letu Ren via cfe-commits
https://github.com/FantasqueX updated https://github.com/llvm/llvm-project/pull/124315 >From e3f118c1435c0f87588c5c51ba01af1aa8136d1d Mon Sep 17 00:00:00 2001 From: Letu Ren Date: Sat, 25 Jan 2025 01:23:52 +0800 Subject: [PATCH 01/15] [Sema] Add code completion for if constexpr C++17 supports

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
@@ -69,17 +70,22 @@ class ParentMapContext::ParentMap { for (; N > 0; --N) push_back(Value); } -bool contains(const DynTypedNode &Value) { - return Seen.contains(Value); +bool contains(const DynTypedNode &Value) const { + const void *Identity

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-13 Thread Ivana Ivanovska via cfe-commits
@@ -1139,26 +1276,30 @@ class ArraySubscriptGadget : public WarningGadget { const ArraySubscriptExpr *ASE; public: - ArraySubscriptGadget(const MatchFinder::MatchResult &Result) + ArraySubscriptGadget(const MatchResult &Result) : WarningGadget(Kind::ArraySubscript),

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-13 Thread Ivana Ivanovska via cfe-commits
@@ -1139,26 +1276,30 @@ class ArraySubscriptGadget : public WarningGadget { const ArraySubscriptExpr *ASE; public: - ArraySubscriptGadget(const MatchFinder::MatchResult &Result) + ArraySubscriptGadget(const MatchResult &Result) : WarningGadget(Kind::ArraySubscript),

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-13 Thread Ivana Ivanovska via cfe-commits
@@ -186,106 +212,193 @@ class MatchDescendantVisitor : public DynamicRecursiveASTVisitor { return DynamicRecursiveASTVisitor::TraverseStmt(Node); } + void setASTContext(ASTContext &Context) { ActiveASTContext = &Context; } + + void setHandler(const UnsafeBufferUsageHa

[clang] [clang][CodeComplete] Add code completion for if constexpr and consteval (PR #124315)

2025-03-13 Thread Letu Ren via cfe-commits
@@ -6749,6 +6749,55 @@ void SemaCodeCompletion::CodeCompleteInitializer(Scope *S, Decl *D) { CodeCompleteExpression(S, Data); } +void SemaCodeCompletion::CodeCompleteIfConst(Scope *S, + bool AfterExclaim) const { + ResultBuilder

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
https://github.com/cor3ntin commented: This looks reasonable, I just have one question https://github.com/llvm/llvm-project/pull/129934 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reduce memory usage in AST parent map generation by lazily checking if nodes have been seen (PR #129934)

2025-03-13 Thread via cfe-commits
@@ -69,17 +70,22 @@ class ParentMapContext::ParentMap { for (; N > 0; --N) push_back(Value); } -bool contains(const DynTypedNode &Value) { - return Seen.contains(Value); +bool contains(const DynTypedNode &Value) const { + const void *Identity

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-13 Thread Ivana Ivanovska via cfe-commits
@@ -1670,30 +1936,41 @@ class ULCArraySubscriptGadget : public FixableGadget { }; // Fixable gadget to handle stand alone pointers of the form `UPC(DRE)` in the -// unspecified pointer context (isInUnspecifiedPointerContext). The gadget emits -// fixit of the form `UPC(DRE.da

[clang] [clang][SYCL] Disable float128 device mode diagnostic (PR #128513)

2025-03-13 Thread Nicolas Miller via cfe-commits
@@ -4700,7 +4700,8 @@ void Sema::AddModeAttr(Decl *D, const AttributeCommonInfo &CI, if (NewElemTy.isNull()) { // Only emit diagnostic on host for 128-bit mode attribute -if (!(DestWidth == 128 && getLangOpts().CUDAIsDevice)) +if (!(DestWidth == 128 && +

[clang] [Clang] Optimize -Wunsafe-buffer-usage. (PR #125492)

2025-03-13 Thread Ivana Ivanovska via cfe-commits
ivanaivanovska wrote: Thanks for the review @ziqingluo-90! https://github.com/llvm/llvm-project/pull/125492 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang-rt] Pass the whole path of libflang_rt.runtime.a to linker on AIX (PR #131041)

2025-03-13 Thread Daniel Chen via cfe-commits
DanielCChen wrote: > With this PR applied? It hardcodes `libflang_rt.runtime.a` on AIX, how can it > find the `.so`? Sorry, I just realized on AIX, both static and shared library are named `.a`, which is why it didn't fail for me. But it is not the case for other platforms. https://github.c

[clang] [flang] [lld] [llvm] [Flang] LLVM_ENABLE_RUNTIMES=flang-rt (PR #110217)

2025-03-13 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/110217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon edited https://github.com/llvm/llvm-project/pull/130993 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Do not set inbounds flag for struct GEP with null base pointers (PR #130734)

2025-03-13 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > this check needs to happen at a higher level. And at that level, you should > have an Expr*, not just an Address. I tried to use `Expr::isNullPointerConstant` in `CodeGenFunction::EmitMemberExpr`: https://github.com/llvm/llvm-project/blob/59fd2878fce470f02058f43d4b818ed68ce040

[clang] Lex: add support for `i128` and `ui128` suffixes (PR #130993)

2025-03-13 Thread Mariya Podchishchaeva via cfe-commits
@@ -13,16 +13,24 @@ __int64 w = 0x43ui64; __int64 z = 9Li64; // expected-error {{invalid suffix}} __int64 q = 10lli64; // expected-error {{invalid suffix}} -__complex double c1 = 1i; -__complex double c2 = 1.0i; +__complex double c1 = 1i; // GNU extension +__complex double c

[clang] [flang] [flang] Add support for -f[no-]verbose-asm (PR #130788)

2025-03-13 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/130788 >From 5d3c1cc1d40b308b93cc47c78c6c3ca677f55155 Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Tue, 11 Mar 2025 15:54:35 + Subject: [PATCH 1/4] [flang] Add support for -f[no-]verbose-asm This flag provides ex

<    1   2   3   4   5