[clang] [compiler-rt] [libcxx] [llvm] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-30 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/96171 >From 84f2af3bef2417ca182a7afe8dfc143c10ae0778 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 20 Jun 2024 21:43:31 +1100 Subject: [PATCH 1/2] [cmake] switch to CMake's native check_linker_flag, delet

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-07-30 Thread via cfe-commits
https://github.com/h-vetinari updated https://github.com/llvm/llvm-project/pull/96171 >From 1df587efeb71fb1929667f008d7e9b251863d9d8 Mon Sep 17 00:00:00 2001 From: "H. Vetinari" Date: Thu, 20 Jun 2024 21:43:31 +1100 Subject: [PATCH 1/6] [cmake] switch to CMake's native check_linker_flag, delet

[clang] [llvm] [Inliner] Propagate more attributes to params when inlining (PR #91101)

2024-07-30 Thread via cfe-commits
goldsteinn wrote: ping2 https://github.com/llvm/llvm-project/pull/91101 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Fix a misannotation of PointerOrReference (PR #101291)

2024-07-30 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/101291 >From c59345d3b70a5343af22f78837ef8a47bea35e41 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 30 Jul 2024 23:20:12 -0700 Subject: [PATCH] [clang-format] Fix a misannotation of PointerOrReference Fixes #10113

[clang] [clang-format] Fix a misannotation of PointerOrReference (PR #101291)

2024-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #101138. --- Full diff: https://github.com/llvm/llvm-project/pull/101291.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+15-14) - (modified) clang/unittests/Format/TokenA

[clang] [clang-format] Fix a misannotation of PointerOrReference (PR #101291)

2024-07-30 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/101291 Fixes #101138. >From 0a162016899abb8a477e0fedad5be0416464ad4a Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Tue, 30 Jul 2024 23:20:12 -0700 Subject: [PATCH] [clang-format] Fix a misannotation of PointerOrReferen

[clang] [Clang][Interp] Fix the location of uninitialized base warning (PR #100761)

2024-07-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. https://github.com/llvm/llvm-project/pull/100761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle virtual calls with covariant return types (PR #101218)

2024-07-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/101218 >From 78961fbfbd791844b1622aa305664199e3451260 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 30 Jul 2024 20:11:37 +0200 Subject: [PATCH] [clang][Interp] Handle virtual calls with covar

[clang] [clang][NFC] Add Type::isPointerOrReferenceType() (PR #101206)

2024-07-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/101206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1961f9f - [clang][NFC] Add Type::isPointerOrReferenceType() (#101206)

2024-07-30 Thread via cfe-commits
Author: Timm Baeder Date: 2024-07-31T08:01:44+02:00 New Revision: 1961f9fc6d7b207734354ca152a6c0a267cce0c0 URL: https://github.com/llvm/llvm-project/commit/1961f9fc6d7b207734354ca152a6c0a267cce0c0 DIFF: https://github.com/llvm/llvm-project/commit/1961f9fc6d7b207734354ca152a6c0a267cce0c0.diff L

[clang] [Driver] Have getTargetSubDirPath better match get_compiler_rt_target (PR #100091)

2024-07-30 Thread Fangrui Song via cfe-commits
@@ -766,9 +766,19 @@ ToolChain::getTargetSubDirPath(StringRef BaseDir) const { return {}; }; - if (auto Path = getPathForTriple(getTriple())) + llvm::Triple Triple = getTriple(); + + // Try triple as is. + if (auto Path = getPathForTriple(Triple)) return *Path;

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: None (eddyz87) Changes This commit introduces attribute bpf_fastcall to declare BPF functions that do not clobber some of the caller saved registers (R0-R5). The idea is to generate the code complying with generic BPF ABI, but all

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-07-30 Thread via cfe-commits
https://github.com/eddyz87 ready_for_review https://github.com/llvm/llvm-project/pull/101228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

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

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-30 Thread Vikram Hegde via cfe-commits
@@ -3,40 +3,40 @@ typedef int __attribute__((vector_size(16))) VI4; constexpr VI4 A = {1,2,3,4}; -static_assert(A[0] == 1, ""); // ref-error {{not an integral constant expression}} -static_assert(A[1] == 2, ""); // ref-error {{not an integral constant expression}} -static_as

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-30 Thread Vikram Hegde via cfe-commits
@@ -442,6 +446,16 @@ namespace { MostDerivedArraySize = 2; MostDerivedPathLength = Entries.size(); } + +void addVectorElementUnchecked(QualType EltTy, uint64_t Size, + uint64_t Idx) { + Entries.push_back(PathEntry::Arra

[clang] [llvm] [BPF] introduce `__attribute__((bpf_fastcall))` (PR #101228)

2024-07-30 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/101228 >From 6a3b5c79d148863f39b84ce3da4e4794829c1c56 Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Wed, 8 May 2024 15:29:47 -0700 Subject: [PATCH] [BPF] introduce __attribute__((bpf_fastcall)) This commit int

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: Thank you for working to get this PR finished up. I see at least two comments from the previous PR not addressed here. Please, let's try and get those addressed. @AaronBallman wanted a test to make sure we reject `&V[0]` which I don't see: https://github.c

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-30 Thread Shafik Yaghmour via cfe-commits
@@ -442,6 +446,16 @@ namespace { MostDerivedArraySize = 2; MostDerivedPathLength = Entries.size(); } + +void addVectorElementUnchecked(QualType EltTy, uint64_t Size, + uint64_t Idx) { + Entries.push_back(PathEntry::Arra

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #101126)

2024-07-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/101126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [LTO] enable `ObjCARCContractPass` only on optimized build (PR #101114)

2024-07-30 Thread Akira Hatanaka via cfe-commits
@@ -588,12 +588,6 @@ bool EmitAssemblyHelper::AddEmitPasses(legacy::PassManager &CodeGenPasses, // this also adds codegenerator level optimization passes. CodeGenFileType CGFT = getCodeGenFileType(Action); - // Add ObjC ARC final-cleanup optimizations. This is done as pa

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-07-30 Thread Craig Topper via cfe-commits
@@ -4768,6 +4768,15 @@ static void handleCallConvAttr(Sema &S, Decl *D, const ParsedAttr &AL) { case ParsedAttr::AT_RISCVVectorCC: D->addAttr(::new (S.Context) RISCVVectorCCAttr(S.Context, AL)); return; + case ParsedAttr::AT_RISCVVLSCC: { +// If the riscv_abi_vl

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-07-30 Thread Craig Topper via cfe-commits
https://github.com/topperc deleted https://github.com/llvm/llvm-project/pull/100346 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-07-30 Thread Craig Topper via cfe-commits
@@ -7920,6 +7923,18 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, CallingConv CCOld = fn->getCallConv(); Attr *CCAttr = getCCTypeAttr(S.Context, attr); + if (attr.getKind() == ParsedAttr::AT_RISCVVLSCC) { +// If the riscv_abi_vle

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH 1/3] [clang-doc] add suport for clang-doc enum generation --- c

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

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

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

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

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

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

[clang-tools-extra] [clang-doc] add support for enums comments in html generation (PR #101282)

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

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH 1/3] [clang-doc] add suport for clang-doc enum generation --- c

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101108 >From 8d054ac3ada0e978fa1a663170090f033016edfe Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 17:48:24 -0400 Subject: [PATCH 1/5] [clang-doc] add support for block commands --- clang-tools

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH 1/3] [clang-doc] add suport for clang-doc enum generation --- c

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH 1/3] [clang-doc] add suport for clang-doc enum generation --- c

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH 1/3] [clang-doc] add suport for clang-doc enum generation --- c

[clang-tools-extra] [clang-doc] add support for comments for members in HTML output (PR #101255)

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

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH 1/2] [clang-doc] add suport for clang-doc enum generation --- c

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH 1/2] [clang-doc] add suport for clang-doc enum generation --- c

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-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 03e1eb29e7169ddb0804b1d0b9d71d6d2aaf531d 4c7623635dee6acac9b732808934efd884cfecbf --e

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 updated https://github.com/llvm/llvm-project/pull/101282 >From ac1c7b5cbf3024bf8cd4021174a47b914d7f7dea Mon Sep 17 00:00:00 2001 From: PeterChou1 Date: Tue, 30 Jul 2024 23:58:27 -0400 Subject: [PATCH] [clang-doc] add suport for clang-doc enum generation --- clang

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes Part of https://github.com/llvm/llvm-project/issues/101129 This patch adds support for enum attaching comments to enums for HTML in clang-doc. It changes the enum generation to table tags where as per

[clang-tools-extra] [clang-doc] add support for enums in html generation (PR #101282)

2024-07-30 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/101282 Part of https://github.com/llvm/llvm-project/issues/101129 This patch adds support for enum attaching comments to enums for HTML in clang-doc. It changes the enum generation to table tags where as perviously

[clang] [X86_32][C++] fix 0 sized struct case in vaarg. (PR #86388)

2024-07-30 Thread Longsheng Mou via cfe-commits
CoTinker wrote: Could you please take time to review it, thank you. @efriedma-quic https://github.com/llvm/llvm-project/pull/86388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 57acabb - [Driver,X86] Update test Clang::Preprocessor/x86_target_features.c after #101151

2024-07-30 Thread Shengchen Kan via cfe-commits
Author: Shengchen Kan Date: 2024-07-31T11:03:23+08:00 New Revision: 57acabb8e09baa38b156965b2dc567a8c7eb2429 URL: https://github.com/llvm/llvm-project/commit/57acabb8e09baa38b156965b2dc567a8c7eb2429 DIFF: https://github.com/llvm/llvm-project/commit/57acabb8e09baa38b156965b2dc567a8c7eb2429.diff

[clang] [clang][dataflow] Handle CXXInheritedCtorInitExpr in ResultObjectVisitor. (PR #99616)

2024-07-30 Thread Artem Dergachev via cfe-commits
haoNoQ wrote: > Thanks for the info -- I wasn't aware of `ConstructionContext`. Will take a > look. Can you point me to some examples of how this is used? The initial motivation was here: https://github.com/llvm/llvm-project/blob/llvmorg-19-init/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp#

[clang] [clang][ASTImporter] Remove trailing return testing on lambda proto (PR #101031)

2024-07-30 Thread Ding Fei via cfe-commits
danix800 wrote: > This commit surfaces another crash on null stmt inside > `CXXDeductionGuideDecl`: > > ```c > namespace foo { > template struct is_same; > template struct enable_if {}; > template > using enable_if_t = typename enable_if<_Cond, _Tp>::type; > > template > in

[clang] [clang][ASTImporter] Remove trailing return testing on lambda proto (PR #101031)

2024-07-30 Thread Ding Fei via cfe-commits
danix800 wrote: > > Another PR would fix the crash when this one is landed. > > Can you land the fix for the crash first? If the other PR gets reverted it > creates a lot of churn, so it would preferable to land that first. Assuming > it is not somehow dependent on this fix. This new crash is

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-30 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: I have more similar improvements when a diagnostic claims a mismatch is in PCH file while it is in a module file. Those would be separate PR(s) as the code change is quite different. https://github.com/llvm/llvm-project/pull/101280 ___

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert closed https://github.com/llvm/llvm-project/pull/101151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fd6faee - [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (#101151)

2024-07-30 Thread via cfe-commits
Author: Shengchen Kan Date: 2024-07-31T10:38:33+08:00 New Revision: fd6faee5b3b5a7c0e5e87aa0b5719a1a48159ea0 URL: https://github.com/llvm/llvm-project/commit/fd6faee5b3b5a7c0e5e87aa0b5719a1a48159ea0 DIFF: https://github.com/llvm/llvm-project/commit/fd6faee5b3b5a7c0e5e87aa0b5719a1a48159ea0.diff

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Volodymyr Sapsai (vsapsai) Changes You can provide more than one AST file as an input. Emit a path for a file with a problem, so you can disambiguate between multiple files. rdar://65005546 --- Full diff: https://github.com/llvm/llvm-pro

[clang] [Modules][Diagnostic] Don't claim a METADATA mismatch is always in PCH file. (PR #101280)

2024-07-30 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai created https://github.com/llvm/llvm-project/pull/101280 You can provide more than one AST file as an input. Emit a path for a file with a problem, so you can disambiguate between multiple files. rdar://65005546 >From c115a7f6b3e36682bfdd9768ab7969e0f11489bb Mon Sep

[clang] [clang][ASTImporter] Remove trailing return testing on lambda proto (PR #101031)

2024-07-30 Thread Ding Fei via cfe-commits
https://github.com/danix800 edited https://github.com/llvm/llvm-project/pull/101031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Add Type::isPointerOrReferenceType() (PR #101206)

2024-07-30 Thread Shafik Yaghmour via cfe-commits
@@ -75,7 +75,7 @@ bool Qualifiers::isStrictSupersetOf(Qualifiers Other) const { const IdentifierInfo* QualType::getBaseTypeIdentifier() const { const Type* ty = getTypePtr(); NamedDecl *ND = nullptr; - if (ty->isPointerType() || ty->isReferenceType()) + if (ty->isPointerO

[clang] [clang][NFC] Add Type::isPointerOrReferenceType() (PR #101206)

2024-07-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik edited https://github.com/llvm/llvm-project/pull/101206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Add Type::isPointerOrReferenceType() (PR #101206)

2024-07-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101206 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Remove trailing return testing on lambda proto (PR #101031)

2024-07-30 Thread Ding Fei via cfe-commits
https://github.com/danix800 edited https://github.com/llvm/llvm-project/pull/101031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] Fix typos in trailing return testing on lambda p… (PR #101031)

2024-07-30 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/101031 >From 35caf00e707b4fb2472d1409e34be7d20e4eeec2 Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 29 Jul 2024 23:18:20 +0800 Subject: [PATCH] [clang][ASTImporter] Remove trailing return testing on lambda proto

[clang] [clang][ASTImporter] Fix typos in trailing return testing on lambda p… (PR #101031)

2024-07-30 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/101031 >From 1e832ad408710d8a896d64e01a9fbf8b9c7a7819 Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 29 Jul 2024 23:18:20 +0800 Subject: [PATCH] [clang][ASTImporter] Remove trailing return testing on lambda proto

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert updated https://github.com/llvm/llvm-project/pull/101151 >From 650f29dd40714ebe52bf5d0a407bd45b9d248269 Mon Sep 17 00:00:00 2001 From: Shengchen Kan Date: Tue, 30 Jul 2024 16:26:39 +0800 Subject: [PATCH 1/5] [Driver,CodeGen] Report error when enabling 64-bit-only f

[clang] nonblocking/nonallocating attributes: 2nd pass caller/callee analysis (PR #99656)

2024-07-30 Thread Doug Wyatt via cfe-commits
@@ -2397,6 +2397,1262 @@ class UnsafeBufferUsageReporter : public UnsafeBufferUsageHandler { }; } // namespace +// = + +namespace FXAnalysis { + +enum class DiagnosticID : uint8_t { + None = 0, // s

[clang] [clang][ASTImporter] Fix typos in trailing return testing on lambda p… (PR #101031)

2024-07-30 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/101031 >From 336bebf7d20feb7a6fab5ad038239b058f62bdfb Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 29 Jul 2024 23:18:20 +0800 Subject: [PATCH 1/2] [clang][ASTImporter] Fix typos in trailing return testing on lam

[clang] [clang][ASTImporter] Fix typos in trailing return testing on lambda p… (PR #101031)

2024-07-30 Thread Shafik Yaghmour via cfe-commits
shafik wrote: > Another PR would fix the crash when this one is landed. Can you land the fix for the crash first? If the other PR gets reverted it creates a lot of churn, so it would preferable to land that first. Assuming it is not somehow dependent on this fix. https://github.com/llvm/llv

[clang] [C++20] [Modules] Always emit the inline builtins (PR #101278)

2024-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Chuanqi Xu (ChuanqiXu9) Changes See the attached test for the motivation example. If we're too greedy to not emit the definition for inline builtins, we may meet a middle end crash. And it should be good to emit inline builtins al

[clang] [C++20] [Modules] Always emit the inline builtins (PR #101278)

2024-07-30 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 created https://github.com/llvm/llvm-project/pull/101278 See the attached test for the motivation example. If we're too greedy to not emit the definition for inline builtins, we may meet a middle end crash. And it should be good to emit inline builtins always. >F

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Shengchen Kan via cfe-commits
@@ -309,8 +309,8 @@ // HRESET: "-target-feature" "+hreset" // NO-HRESET: "-target-feature" "-hreset" -// RUN: %clang --target=i386 -march=i386 -muintr %s -### 2>&1 | FileCheck -check-prefix=UINTR %s -// RUN: %clang --target=i386 -march=i386 -mno-uintr %s -### 2>&1 | FileCheck

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 @llvm/pr-subscribers-clang-driver Author: Shengchen Kan (KanRobert) Changes In front-end, now we detect for `-mapx-features=/-mapxf` and `-muintr`, which is aligned with GCC https://gcc.gnu.org/bugzilla/attachment.cgi?id=58698&action=diff

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Shengchen Kan via cfe-commits
https://github.com/KanRobert updated https://github.com/llvm/llvm-project/pull/101151 >From 650f29dd40714ebe52bf5d0a407bd45b9d248269 Mon Sep 17 00:00:00 2001 From: Shengchen Kan Date: Tue, 30 Jul 2024 16:26:39 +0800 Subject: [PATCH 1/4] [Driver,CodeGen] Report error when enabling 64-bit-only f

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Phoebe Wang via cfe-commits
https://github.com/phoebewang approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/101151 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Freddy Ye via cfe-commits
@@ -248,6 +248,10 @@ void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, Features.push_back(Args.MakeArgString((IsNegative ? "-" : "+") + Name)); } + llvm::StringSet<> SubFeaturesOfAPX = {"egpr", "push2pop2", "ppx", "ndd", +

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Shengchen Kan via cfe-commits
@@ -266,13 +270,24 @@ void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, } bool IsNegative = Name.starts_with("no-"); + +bool Not64Bit = ArchType != llvm::Triple::x86_64; KanRobert wrote: It would not. We check the option

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Shengchen Kan via cfe-commits
@@ -248,6 +248,10 @@ void x86::getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, Features.push_back(Args.MakeArgString((IsNegative ? "-" : "+") + Name)); } + llvm::StringSet<> SubFeaturesOfAPX = {"egpr", "push2pop2", "ppx", "ndd", +

[clang] [clang] Emit constraint intrinsics for arc and hyperbolic trig clang builtins (PR #98949)

2024-07-30 Thread Alan Zhao via cfe-commits
alanzhao1 wrote: > @alanzhao1 @efriedma-quic It should be fixed now by #101268 if you role the > clang build to latest. Confirmed. Thanks! https://github.com/llvm/llvm-project/pull/98949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [Driver] Pass correct alignment for -falign-functions with no argument (PR #101257)

2024-07-30 Thread Fangrui Song via cfe-commits
@@ -1982,7 +1982,7 @@ unsigned tools::ParseFunctionAlignment(const ToolChain &TC, return 0; if (A->getOption().matches(options::OPT_falign_functions)) -return 0; +return 4; // log2(16) MaskRay wrote: I agree that clangDriver should not hard cod

[clang] [Driver] Include crt0.o in the baremetal link (PR #101258)

2024-07-30 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/101258 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Include crt0.o in the baremetal link (PR #101258)

2024-07-30 Thread Fangrui Song via cfe-commits
@@ -105,6 +109,10 @@ // CHECK-V6M-LIBCXX-USR-SAME: "-lc++" "-lc++abi" "-lunwind" // CHECK-V6M-LIBCXX-USR-SAME: "-lc" "-lm" "{{[^"]*}}libclang_rt.builtins.a" +// RUN: %clangxx --target=arm-none-eabi -nostartfiles -v 2>&1 \ MaskRay wrote: `-v` without an input

[clang] [llvm] [Driver,CodeGen] Report error when enabling 64-bit-only features on non-64-bit arch (PR #101151)

2024-07-30 Thread Shengchen Kan via cfe-commits
@@ -309,8 +309,8 @@ // HRESET: "-target-feature" "+hreset" // NO-HRESET: "-target-feature" "-hreset" -// RUN: %clang --target=i386 -march=i386 -muintr %s -### 2>&1 | FileCheck -check-prefix=UINTR %s -// RUN: %clang --target=i386 -march=i386 -mno-uintr %s -### 2>&1 | FileCheck

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

2024-07-30 Thread Shafik Yaghmour via cfe-commits
@@ -314,53 +316,69 @@ class APValue { DataType Data; public: - APValue() : Kind(None) {} - explicit APValue(APSInt I) : Kind(None) { + bool allowConstexprUnknown() const { return AllowConstexprUnknown; } + + void setConstexprUnknown() { AllowConstexprUnknown = true; } --

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

2024-07-30 Thread Shafik Yaghmour via cfe-commits
@@ -314,53 +316,69 @@ class APValue { DataType Data; public: - APValue() : Kind(None) {} - explicit APValue(APSInt I) : Kind(None) { + bool allowConstexprUnknown() const { return AllowConstexprUnknown; } + + void setConstexprUnknown() { AllowConstexprUnknown = true; } +

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

2024-07-30 Thread Shafik Yaghmour via cfe-commits
@@ -1917,6 +1929,16 @@ APValue &CallStackFrame::createTemporary(const KeyT *Key, QualType T, return createLocal(Base, Key, T, Scope); } +APValue & +CallStackFrame::createConstexprUnknownAPValues(const VarDecl *Key, + APValue::LV

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

2024-07-30 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/95474 >From 69b09ea5b0f0a1c5419c488ade29b6fedc6de773 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Thu, 13 Jun 2024 14:20:50 -0700 Subject: [PATCH 1/5] [Clang] Implement P2280R4 Using unknown pointers and refere

[clang] [clang codegen] Emit int TBAA metadata on more FP math libcalls (PR #100302)

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

[clang] 9589c12 - [clang codegen] Emit int TBAA metadata on more FP math libcalls (#100302)

2024-07-30 Thread via cfe-commits
Author: Allen Date: 2024-07-31T09:01:20+08:00 New Revision: 9589c128ae40df3e2277487544e693f3887f7d63 URL: https://github.com/llvm/llvm-project/commit/9589c128ae40df3e2277487544e693f3887f7d63 DIFF: https://github.com/llvm/llvm-project/commit/9589c128ae40df3e2277487544e693f3887f7d63.diff LOG: [c

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -631,7 +631,19 @@ static std::unique_ptr genHTML(const CommentInfo &I) { return nullptr; return std::move(ParagraphComment); } - ilovepi wrote: Why remove the new line? https://github.com/llvm/llvm-project/pull/101108 _

[clang-tools-extra] [clang-doc] add support for block commands in clang-doc html output (PR #101108)

2024-07-30 Thread Paul Kirth via cfe-commits
@@ -619,7 +620,6 @@ static std::unique_ptr genHTML(const CommentInfo &I) { } return std::move(FullComment); } - ilovepi wrote: Unrelated? https://github.com/llvm/llvm-project/pull/101108 ___ cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-30 Thread Damyan Pepper via cfe-commits
@@ -5318,3 +5319,13 @@ OMPIteratorExpr *OMPIteratorExpr::CreateEmpty(const ASTContext &Context, alignof(OMPIteratorExpr)); return new (Mem) OMPIteratorExpr(EmptyShell(), NumIterators); } + +HLSLOutArgExpr *HLSLOutArgExpr::Create(const ASTContext &C, QualType Ty, +

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-30 Thread Damyan Pepper via cfe-commits
@@ -4613,14 +4613,13 @@ def HLSLGroupSharedAddressSpace : TypeAttr { let Documentation = [HLSLGroupSharedAddressSpaceDocs]; } -def HLSLParamModifier : TypeAttr { +def HLSLParamModifier : ParameterABIAttr { damyanp wrote: as an aside: what's the plan for / s

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -finclude-default-header -verify -Wdouble-promotion -Wconversion %s + +void OutVecFn(out float3) {} +void InOutVecFn(inout float3) {} + +// Case 1: Calling out and inout parameters with types that cannot

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-30 Thread Damyan Pepper via cfe-commits
@@ -4689,6 +4719,32 @@ void CodeGenFunction::EmitCallArg(CallArgList &args, const Expr *E, assert(type->isReferenceType() == E->isGLValue() && "reference binding to unmaterialized r-value!"); + // Add writeback for HLSLOutParamExpr. + if (const HLSLOutArgExpr *OE

[clang] [HLSL] Implement output parameter (PR #101083)

2024-07-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,34 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -finclude-default-header -verify -Wdouble-promotion -Wconversion %s + +void OutVecFn(out float3) {} +void InOutVecFn(inout float3) {} + +// Case 1: Calling out and inout parameters with types that cannot

[clang] [clang] Emit constraint intrinsics for arc and hyperbolic trig clang builtins (PR #98949)

2024-07-30 Thread Farzon Lotfi via cfe-commits
farzonl wrote: @alanzhao1 @efriedma-quic It should be fixed now by #101268 if you role the clang build to latest. https://github.com/llvm/llvm-project/pull/98949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -245,6 +274,18 @@ void SemaHLSL::CheckEntryPoint(FunctionDecl *FD) { << llvm::Triple::getEnvironmentTypeName(ST); FD->setInvalidDecl(); } +if (const auto *NT = FD->getAttr()) { llvm-beanz wrote: Why is NT the name here? That doesn't

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -348,6 +391,77 @@ void SemaHLSL::handleNumThreadsAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +void SemaHLSL::handleWaveSizeAttr(Decl *D, const ParsedAttr &AL) { + // validate that the wavesize argument is a power of 2 between 4 and 128 + // inclusive

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -12361,6 +12361,21 @@ def warn_hlsl_availability_unavailable : def err_hlsl_export_not_on_function : Error< "export declaration can only be used on functions">; +def err_hlsl_attribute_in_wrong_shader_model: Error< + "attribute %0 requires shader model %1 or greater">; +

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -12361,6 +12361,21 @@ def warn_hlsl_availability_unavailable : def err_hlsl_export_not_on_function : Error< "export declaration can only be used on functions">; +def err_hlsl_attribute_in_wrong_shader_model: Error< + "attribute %0 requires shader model %1 or greater">; +

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -12361,6 +12361,21 @@ def warn_hlsl_availability_unavailable : def err_hlsl_export_not_on_function : Error< "export declaration can only be used on functions">; +def err_hlsl_attribute_in_wrong_shader_model: Error< + "attribute %0 requires shader model %1 or greater">; +

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -245,6 +274,18 @@ void SemaHLSL::CheckEntryPoint(FunctionDecl *FD) { << llvm::Triple::getEnvironmentTypeName(ST); FD->setInvalidDecl(); } +if (const auto *NT = FD->getAttr()) { + if (Ver < VersionTuple(6, 6)) { +Diag(NT->getLocation(), di

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -12361,6 +12361,21 @@ def warn_hlsl_availability_unavailable : def err_hlsl_export_not_on_function : Error< "export declaration can only be used on functions">; +def err_hlsl_attribute_in_wrong_shader_model: Error< + "attribute %0 requires shader model %1 or greater">; +

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -2862,6 +2862,10 @@ static bool mergeDeclAttribute(Sema &S, NamedDecl *D, else if (const auto *NT = dyn_cast(Attr)) NewAttr = S.HLSL().mergeNumThreadsAttr(D, *NT, NT->getX(), NT->getY(), NT->getZ()); + else if (const auto *NT

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-07-30 Thread Chris B via cfe-commits
@@ -12361,6 +12361,21 @@ def warn_hlsl_availability_unavailable : def err_hlsl_export_not_on_function : Error< "export declaration can only be used on functions">; +def err_hlsl_attribute_in_wrong_shader_model: Error< + "attribute %0 requires shader model %1 or greater">; +

  1   2   3   4   >