[clang] [llvm] Tentative fix for not removing newly internal functions (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106146 >From 1e39029007dee5825810965fa39f26996ec9b7aa Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Sun, 25 Aug 2024 12:00:03 -0600 Subject: [PATCH] [DirectX] Remove trivially dead functions at linkage finalize Funct

[clang] [DebugInfo] Correct the line attribution for IF branches (PR #108300)

2024-09-19 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. Fair enough https://github.com/llvm/llvm-project/pull/108300 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Tentative fix for not removing newly internal functions (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
https://github.com/pow2clk updated https://github.com/llvm/llvm-project/pull/106146 >From 70d4b5de3e9a214d50560f047b334de7f0818167 Mon Sep 17 00:00:00 2001 From: Greg Roth Date: Sun, 25 Aug 2024 12:00:03 -0600 Subject: [PATCH] [DirectX] Remove trivially dead functions at linkage finalize Funct

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread via cfe-commits
Prabhuk wrote: I am holding off of on my revert PR to see if the current build bot with this patch goes through successfully! Thanks again Pranav. https://github.com/llvm/llvm-project/pull/109329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 7db641a - [clang] Don't call raw_string_ostream::flush() (NFC)

2024-09-19 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-09-19T17:18:10-05:00 New Revision: 7db641af13670aa1f1ecd3106eda3ce447afd752 URL: https://github.com/llvm/llvm-project/commit/7db641af13670aa1f1ecd3106eda3ce447afd752 DIFF: https://github.com/llvm/llvm-project/commit/7db641af13670aa1f1ecd3106eda3ce447afd752.diff

[clang] [llvm] [X86] Use X86AS::GS and X86AS::FS instead of 256 and 257. NFC (PR #109342)

2024-09-19 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/109342 None >From bc0a290b1e139f32225bc55fc99027b34c4f1bd6 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Thu, 19 Sep 2024 15:13:55 -0700 Subject: [PATCH] [X86] Use X86AS::GS and X86AS::FS instead of 256 and 257. N

[clang] [llvm] [X86] Use X86AS::GS and X86AS::FS instead of 256 and 257. NFC (PR #109342)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Craig Topper (topperc) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/109342.diff 4 Files Affected: - (modified) clang/lib/CodeGen/CMakeLists.txt (+1) - (modified) llvm/lib/Target/X86/X86ISelLowering.cpp (+3-3)

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread via cfe-commits
Prabhuk wrote: It seems like we are still seeing failures: https://lab.llvm.org/buildbot/#/builders/190/builds/6112 https://github.com/llvm/llvm-project/pull/109329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] Revert "[Driver] Add toolchain for X86_64 UEFI target" (PR #109340)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk reopened https://github.com/llvm/llvm-project/pull/109340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d2df2e4 - Revert "[Driver] Add toolchain for X86_64 UEFI target" (#109340)

2024-09-19 Thread via cfe-commits
Author: Prabhuk Date: 2024-09-19T15:28:07-07:00 New Revision: d2df2e41cae1413050935d6d27094569c29c473f URL: https://github.com/llvm/llvm-project/commit/d2df2e41cae1413050935d6d27094569c29c473f DIFF: https://github.com/llvm/llvm-project/commit/d2df2e41cae1413050935d6d27094569c29c473f.diff LOG:

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread via cfe-commits
Prabhuk wrote: I just merged my revert PR https://github.com/llvm/llvm-project/pull/109340 I'll investigate further on the cause for the warning that shows up in the build bots causing the test failure https://github.com/llvm/llvm-project/pull/109329 ___

[clang] Revert "[Driver] Add toolchain for X86_64 UEFI target" (PR #109340)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk closed https://github.com/llvm/llvm-project/pull/109340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV][VCIX] Add vcix_state to GNU inline assembly register set (PR #106914)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -44,7 +44,7 @@ ArrayRef RISCVTargetInfo::getGCCRegNames() const { "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", // CSRs - "fflags", "frm", "vtype", "vl", "vxsat", "vxrm" + "fflags", "frm", "vtype", "vl", "vxsat", "vxrm", "sf_vcix_state"

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -14270,9 +14270,16 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, Target->initFeatureMap(FeatureMap, getDiagnostics(), TargetCPU, Features); } } else if (const auto *TV = FD->getAttr()) { -llvm::SmallVector Feats; -TV->getFeature

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -15501,8 +15511,10 @@ Decl *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Decl *D, FD->setInvalidDecl(); } if (const auto *Attr = FD->getAttr()) { -if (!Context.getTargetInfo().hasFeature("fmv") && -!Attr->isDefaultVersion()) { +if (Context.getTa

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -4268,8 +4268,12 @@ void CodeGenModule::emitMultiVersionFunctions() { } else if (const auto *TVA = CurFD->getAttr()) { if (TVA->isDefaultVersion() && IsDefined) ShouldEmitResolver = true; -TVA->getFeatures(Feats);

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -3056,6 +3056,45 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, enum SecondParam { None }; enum ThirdParam { Target, TargetClones, TargetVersion }; llvm::SmallVector Features; + if (Context.getTargetInfo().getTriple().isRISCV()) { + +llv

[clang] [RISCV][FMV] Support target_version (PR #99040)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -3056,6 +3056,45 @@ bool Sema::checkTargetVersionAttr(SourceLocation LiteralLoc, Decl *D, enum SecondParam { None }; enum ThirdParam { Target, TargetClones, TargetVersion }; llvm::SmallVector Features; + if (Context.getTargetInfo().getTriple().isRISCV()) { + +llv

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-latest-gcc` running on `linaro-flang-aarch64-latest-gcc` while building `clang,flang,mlir` at step 6 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-19 Thread via cfe-commits
yronglin wrote: > Does it work to _not_ discard the result of a compound operator? > > ```c++ > using VI __attribute__((ext_vector_type(4))) = int; > > constexpr int a() { > VI a = {0, 0, 0, 0}; > VI b = {1,1,1,1}; > > VI C = (a += b); > > return 0; > } > > static_assert(a()

[clang] [llvm] [llvm][Triple] Add `Environment` members and parsing for glibc/musl parity. (PR #107664)

2024-09-19 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: > OK. Then I will work on GCC with this support. Thank you, much appreciated! https://github.com/llvm/llvm-project/pull/107664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang][bytecode] Implement arithmetic, bitwise and compound assignment operator (PR #108949)

2024-09-19 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/108949 >From 3601f708847f70485fae640c5b5d96fed965e7c3 Mon Sep 17 00:00:00 2001 From: yronglin Date: Tue, 17 Sep 2024 17:39:47 +0800 Subject: [PATCH 1/3] [clang][bytecode] Implement arithmetic, bitwise and compound as

[clang] [Clang][Sema] Fix templated array size calculation. (PR #96464)

2024-09-19 Thread via cfe-commits
https://github.com/awson updated https://github.com/llvm/llvm-project/pull/96464 >From 096b999120cc28844d780acbc16f8308b3a54160 Mon Sep 17 00:00:00 2001 From: awson Date: Mon, 24 Jun 2024 10:34:51 +0300 Subject: [PATCH 1/3] [Clang][Sema] don't handle ArraySize/AllocType early. --- clang/lib/Se

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update ClangFormat.rst (PR #109380)

2024-09-19 Thread via cfe-commits
https://github.com/love1angel created https://github.com/llvm/llvm-project/pull/109380 latest vim such as 9.1 remove python and add python3 dependency >From 1dfa78f2f5f0f873ddc41687158dc48588527035 Mon Sep 17 00:00:00 2001 From: helianthus <45203165+love1an...@users.noreply.github.com> Date: Fr

[clang] ea57880 - [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (#108475)

2024-09-19 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-09-20T02:23:58-04:00 New Revision: ea578804c81bbad1f31a0c940c8f4378d6893ede URL: https://github.com/llvm/llvm-project/commit/ea578804c81bbad1f31a0c940c8f4378d6893ede DIFF: https://github.com/llvm/llvm-project/commit/ea578804c81bbad1f31a0c940c8f4378d6893ede.diff

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Update ClangFormat.rst (PR #109380)

2024-09-19 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] Update ClangFormat.rst (PR #109380)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: helianthus (love1angel) Changes latest vim such as 9.1 remove python and add python3 dependency --- Full diff: https://github.com/llvm/llvm-project/pull/109380.diff 1 Files Affected: - (modified) clang/docs/ClangFormat.rst (+5-2) ```

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread Sam James via cfe-commits
thesamesam wrote: (I'm fine with maskray's idea as well.) https://github.com/llvm/llvm-project/pull/109278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-19 Thread Nathan Ridge via cfe-commits
@@ -451,8 +451,17 @@ const RawComment *ASTContext::getRawCommentForAnyRedecl( if (LastCheckedRedecl) { if (LastCheckedRedecl == Redecl) { LastCheckedRedecl = nullptr; +continue; HighCommander4 wrote: The fix for #108145 has merged now

[clang] [clang-tools-extra] [clangd] Collect comments from function definitions into the index (PR #67802)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/67802 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread Sam James via cfe-commits
https://github.com/thesamesam approved this pull request. https://github.com/llvm/llvm-project/pull/109278 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ExprConst] Explicitly reject dependent types without diagnostic (PR #108598)

2024-09-19 Thread Timm Baeder via cfe-commits
tbaederr wrote: Ping https://github.com/llvm/llvm-project/pull/108598 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Florian Mayer via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer fmayer wrote: why are we only testing one of those? https://github.com/llvm/llvm-project/

[clang-tools-extra] [clang-tidy] modernize-use-nullptr matches "NULL" in templates (PR #109169)

2024-09-19 Thread Thomas Köppe via cfe-commits
@@ -84,6 +84,29 @@ void test_macro_expansion4() { #undef MY_NULL } +template struct pear { + // If you say __null (or NULL), we assume that T will always be a pointer tkoeppe wrote: That was the whole thing we were belaboring earlier -- this test defines `N

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread Pranav Bhandarkar via cfe-commits
bhandarkar-pranav wrote: > Looks like this breaks tests on Mac: http://45.33.8.238/macm1/92471/step_6.txt > > Please take a look and revert for now if it takes a while to fix. @nico I cannot access the link from my work VPN, but if this is the issue (https://github.com/llvm/llvm-project/issues

[clang] 221f15f - [Clang] - Add libclangSerialization to clang driver unittests (#109329)

2024-09-19 Thread via cfe-commits
Author: Pranav Bhandarkar Date: 2024-09-19T16:51:08-05:00 New Revision: 221f15fc145d46289781206f241ae564cd9510f0 URL: https://github.com/llvm/llvm-project/commit/221f15fc145d46289781206f241ae564cd9510f0 DIFF: https://github.com/llvm/llvm-project/commit/221f15fc145d46289781206f241ae564cd9510f0.d

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread Pranav Bhandarkar via cfe-commits
https://github.com/bhandarkar-pranav closed https://github.com/llvm/llvm-project/pull/109329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -3681,6 +3698,11 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, D.Diag(diag::err_drv_invalid_value) << A->getOption().getName() << Value; return; } +if (EffectiveTriple.isRISCV() && Value != "tp") { + D.Diag(diag::err_drv_inva

[clang] Revert "[Driver] Add toolchain for X86_64 UEFI target" (PR #109340)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Prabhuk (Prabhuk) Changes Reverts llvm/llvm-project#76838 Appears to be causing failures in MAC builders. First reverting the patch and will investigate after. --- Full diff: https://github.com/llvm/llvm-project/pull/109340.diff

[clang] Revert "[Driver] Add toolchain for X86_64 UEFI target" (PR #109340)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/109340 Reverts llvm/llvm-project#76838 Appears to be causing failures in MAC builders. First reverting the patch and will investigate after. >From 7830c3e9d61e168a1de1fa2b33acc3fd4e22f2ed Mon Sep 17 00:00:00 2001 Fro

[clang] Revert "[Driver] Add toolchain for X86_64 UEFI target" (PR #109340)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Prabhuk (Prabhuk) Changes Reverts llvm/llvm-project#76838 Appears to be causing failures in MAC builders. First reverting the patch and will investigate after. --- Full diff: https://github.com/llvm/llvm-

[clang] [llvm] [Loads] Check context instruction for context-sensitive derefability (PR #109277)

2024-09-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: Please update the documentation for isSafeToSpeculativelyExecute() to specify the semantics in the case where the operands of the instruction don't dominate CtxI. https://github.com/llvm/llvm-project/pull/109277 ___ cfe-commits m

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-19 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > If DataLayout is still a good place, then it might be just about whether we > call it a flat address space, or optimizable address space, and nothing would > be different from what is done in this PR. We've avoided putting optimization properties in the DataLayout in the

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread via cfe-commits
Prabhuk wrote: I am going to revert this and check the failures after. https://github.com/llvm/llvm-project/pull/76838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread via cfe-commits
Prabhuk wrote: Thank you Pranav! This looks like a reasonable fix to me. I just created a revert PR though since I cannot test this right away locally. https://github.com/llvm/llvm-project/pull/109329 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [llvm] riscv: Support -mstack-protector-guard=tls (PR #108942)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -3644,13 +3645,28 @@ static void RenderSSPOptions(const Driver &D, const ToolChain &TC, << A->getOption().getName() << Value << "sysreg global"; return; } +if (EffectiveTriple.isRISCV()) { + if (Value != "tls" && Value != "global") { ---

[clang] Revert "[Driver] Add toolchain for X86_64 UEFI target" (PR #109340)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk closed https://github.com/llvm/llvm-project/pull/109340 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [mlir] Make MMIWP not have ownership over MMI + Make MMI Only Use an External MCContext (PR #105541)

2024-09-19 Thread Matin Raayai via cfe-commits
matinraayai wrote: > sorry for the delay > > after looking at MMI/MCContext, I agree that MMI shouldn't own MCContext, but > do we even need a reference from MMI to MCContext? they are different layers > of codegen IIUC. if it's possible to completely separate them we should do > that (pleas

[clang] Revert "[Driver] Add toolchain for X86_64 UEFI target" (PR #109340)

2024-09-19 Thread via cfe-commits
Prabhuk wrote: https://github.com/llvm/llvm-project/commit/221f15fc145d46289781206f241ae564cd9510f0 attemps to fix the failure caused by the Driver PR. Holding off of on the revert to see if the fix is successful. https://github.com/llvm/llvm-project/pull/109340 ___

[clang] [Clang][TableGen] Add explicit symbol visibility macros to code generated (PR #109362)

2024-09-19 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod updated https://github.com/llvm/llvm-project/pull/109362 >From 363e96ba9ed442698c134f7f716a667e65ba3dbb Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Mon, 8 Jul 2024 01:48:46 +0100 Subject: [PATCH 1/2] [Clang][TableGen] Add explicit symbol visibility macros to c

[clang] [C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #109167)

2024-09-19 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > > Would you like to explain more why this fail previously in more detail? > > Original code in `ASTReader::finishPendingActions` looked like this: > > ``` > for (auto ID : PendingLambdas) > GetDecl(ID); > PendingLambdas.clear(); > ``` > > The issue here is tha

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86] Use X86AS::GS and X86AS::FS instead of 256 and 257. NFC (PR #109342)

2024-09-19 Thread Craig Topper via cfe-commits
@@ -144,6 +144,7 @@ add_clang_library(clangCodeGen VarBypassDetector.cpp DEPENDS + vt_gen topperc wrote: I don't know how that got in here. https://github.com/llvm/llvm-project/pull/109342 ___ cfe-commits mail

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/108475 >From 1df68534d086e20572f2371239826d6b3514e58b Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Tue, 10 Sep 2024 22:34:55 -0400 Subject: [PATCH] [AST] Ensure getRawCommentsForAnyRedecl() does not miss an

[clang] [Driver][Sparc] Default to -mcpu=v9 for 32-bit Linux/sparc64 (PR #109278)

2024-09-19 Thread Fangrui Song via cfe-commits
MaskRay wrote: We try to restrict distribution differences to things like default linker options and library paths. Affecting `-mcpu=` seems very unintuitive. There are many Debian derivatives. It's weird that Debian uses -mcpu=v9 while others use -mcpu=v8. We should not increase `IsDebian` or

[clang] [PAC][clang] Use cc1 instead of driver in init-fini codegen test (PR #109247)

2024-09-19 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 closed https://github.com/llvm/llvm-project/pull/109247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b0e68a9 - [PAC][clang] Use cc1 instead of driver in init-fini codegen test (#109247)

2024-09-19 Thread via cfe-commits
Author: Daniil Kovalev Date: 2024-09-20T08:53:49+03:00 New Revision: b0e68a9a53e6bc1396271ee3d79cb86c8049fe17 URL: https://github.com/llvm/llvm-project/commit/b0e68a9a53e6bc1396271ee3d79cb86c8049fe17 DIFF: https://github.com/llvm/llvm-project/commit/b0e68a9a53e6bc1396271ee3d79cb86c8049fe17.diff

[clang] [AST] Ensure getRawCommentsForAnyRedecl() does not miss any redecl with a comment (PR #108475)

2024-09-19 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Added release note. I put it under "Bug Fixes to AST Handling" which seemed like a good fit. https://github.com/llvm/llvm-project/pull/108475 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [lld] [llvm] [mlir] [IR] Introduce `T` to `DataLayout` to represent flat address space if a target supports it (PR #108786)

2024-09-19 Thread Johannes Doerfert via cfe-commits
jdoerfert wrote: > > +1 to @efriedma-quic and @jdoerfert's comments. DataLayout should remain as > > generic as possible. Trying to encode a concept of "_the_ flat address > > space" in it seems way too specific to one optimization for one or two > > targets. > > This isn't purely a nice to h

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Timm Baeder via cfe-commits
@@ -108,22 +108,16 @@ constexpr auto p2 = "test2"; constexpr bool b1 = foo(p1) == foo(p1); static_assert(b1); -constexpr bool b2 = foo(p1) == foo(p2); // ref-error {{must be initialized by a constant expression}} \ -// ref-note {{compar

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Timm Baeder via cfe-commits
@@ -2142,11 +2150,91 @@ static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) { return LVal.Base.dyn_cast(); } -static bool IsLiteralLValue(const LValue &Value) { - if (Value.getLValueCallIndex()) +// Information about an LValueBase that is some kind of string. +st

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-19 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/108657 >From 70d1be2a2a0f2f44cdd70bfb4397e7a36f1c9f30 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sat, 14 Sep 2024 01:46:28 +0300 Subject: [PATCH 1/3] [Clang] prevented assertion failure by handling integral t

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
@@ -74,6 +74,22 @@ C++ Specific Potentially Breaking Changes template void f(); +- During constant evaluation, comparisons between different evaluations of the + same string literal are now correctly treated as non-constant, and comparisons + between string literal

[clang] ac66469 - [clang] Tidy uses of raw_string_ostream (NFC)

2024-09-19 Thread Youngsuk Kim via cfe-commits
Author: Youngsuk Kim Date: 2024-09-19T14:56:45-05:00 New Revision: ac664697c54cf2ffa9ebef0215f734bcca3b718f URL: https://github.com/llvm/llvm-project/commit/ac664697c54cf2ffa9ebef0215f734bcca3b718f DIFF: https://github.com/llvm/llvm-project/commit/ac664697c54cf2ffa9ebef0215f734bcca3b718f.diff

[clang] [Clang] prevented assertion failure by handling integral to boolean conversions for boolean vectors (PR #108657)

2024-09-19 Thread Oleksandr T. via cfe-commits
@@ -51,6 +53,9 @@ static void test(void) { ivec4 -= ivec4; ivec4 |= ivec4; ivec4 += ptr; // expected-error {{cannot convert between vector and non-scalar values ('int4' (vector of 4 'int' values) and 'int *')}} + +bvec4 != 0; // expected-warning {{inequality co

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-19 Thread Eli Friedman via cfe-commits
@@ -738,7 +738,7 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE, bool AllowOverwrite) { // Zero-sized fields are not emitted, but their initializers may still // prevent emission of this struct as a constant. if (isEmptyFieldForLayout(CGM.getContext(), F

[clang] [clang][CodeGen] Check initializer of zero-size fields for nullptr (PR #109271)

2024-09-19 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK +// RUN: %clang_cc1 -x c++ %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefixes=CHECK-CXX + +union Foo { + struct Empty {} val; +}; + +u

[clang] [C++20] [Modules] Offer -fmodules-embed-all-files option (PR #107194)

2024-09-19 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 closed https://github.com/llvm/llvm-project/pull/107194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [mlir] [clang][flang][mlir] Support -frecord-command-line option (PR #102975)

2024-09-19 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `flang-aarch64-sharedlibs` running on `linaro-flang-aarch64-sharedlibs` while building `clang,flang,mlir` at step 6 "test-build-unified-tree-check-flang". Full details are available at: https://lab.llvm.org/buildbot/#/builders

[clang] f41f6ea - [C++20] [Modules] Offer -fmodules-embed-all-files option (#107194)

2024-09-19 Thread via cfe-commits
Author: Chuanqi Xu Date: 2024-09-20T09:57:46+08:00 New Revision: f41f6ea1f33c4f5e7c94f3d155e44292d1809c50 URL: https://github.com/llvm/llvm-project/commit/f41f6ea1f33c4f5e7c94f3d155e44292d1809c50 DIFF: https://github.com/llvm/llvm-project/commit/f41f6ea1f33c4f5e7c94f3d155e44292d1809c50.diff LO

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/109360 2fcaa549a824efeb56e807fcf750a56bf985296b (2010) added cc1as option `-output-asm-variant` (untested) to set the output syntax. `clang -cc1as -filetype asm -output-asm-variant 1` allows AT&T input and Intel output.

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Fangrui Song (MaskRay) Changes 2fcaa549a824efeb56e807fcf750a56bf985296b (2010) added cc1as option `-output-asm-variant` (untested) to set the output syntax. `clang -cc1as -filetype asm -output-asm-variant 1` allows AT&T input and In

[clang] [clang-format] Correctly annotate pointer/reference in range-for loop (PR #109361)

2024-09-19 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/109361 Fixes #109358. >From d954c56f41a96ace6b507f6e6f4531c885db9f38 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Thu, 19 Sep 2024 18:56:38 -0700 Subject: [PATCH] [clang-format] Correctly annotate pointer/reference in

[clang] [clang-format] Correctly annotate pointer/reference in range-for loop (PR #109361)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #109358. --- Full diff: https://github.com/llvm/llvm-project/pull/109361.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+6) - (modified) clang/unittests/Format/TokenAnnot

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes 2fcaa549a824efeb56e807fcf750a56bf985296b (2010) added cc1as option `-output-asm-variant` (untested) to set the output syntax. `clang -cc1as -filetype asm -output-asm-variant 1` allows AT&T input and Intel outp

[clang] [llvm] [clang] Add cc1 --output-asm-variant= to set output syntax (PR #109360)

2024-09-19 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/109360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][TableGen] Add explicit symbol visibility macros to code generated (PR #109362)

2024-09-19 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod created https://github.com/llvm/llvm-project/pull/109362 Update ClangAttrEmitter TableGen to add explicit symbol visibility macros to class declarations it creates. Both AnnotateFunctions and Attribute example plugins require clang::AnnotateAttr TableGen created functi

[clang] [Clang][TableGen] Add explicit symbol visibility macros to code generated (PR #109362)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Thomas Fransham (fsfod) Changes Update ClangAttrEmitter TableGen to add explicit symbol visibility macros to class declarations it creates. Both AnnotateFunctions and Attribute example plugins require clang::AnnotateAttr TableGen created

[clang] [Clang][TableGen] Add explicit symbol visibility macros to code generated (PR #109362)

2024-09-19 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 3b3accb598ec87a6a30b0e18ded06071030bb78f 363e96ba9ed442698c134f7f716a667e65ba3dbb --e

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-19 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek approved this pull request. https://github.com/llvm/llvm-project/pull/109364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-19 Thread Richard Smith via cfe-commits
https://github.com/zygoloid updated https://github.com/llvm/llvm-project/pull/109208 >From 81193568c17a89f6cf42f43a82fb1fbf0f90184d Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 18 Sep 2024 21:59:56 + Subject: [PATCH 01/11] Implement current CWG direction for string literal compa

[clang] 3b3accb - [SystemZ][z/OS] Propagate IsText flag continuation

2024-09-19 Thread Abhina Sreeskantharajan via cfe-commits
Author: Abhina Sreeskantharajan Date: 2024-09-19T15:16:08-04:00 New Revision: 3b3accb598ec87a6a30b0e18ded06071030bb78f URL: https://github.com/llvm/llvm-project/commit/3b3accb598ec87a6a30b0e18ded06071030bb78f DIFF: https://github.com/llvm/llvm-project/commit/3b3accb598ec87a6a30b0e18ded06071030b

[clang-tools-extra] [clang-tools-extra] Fix add_clang_library usage (PR #109321)

2024-09-19 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod updated https://github.com/llvm/llvm-project/pull/109321 >From 41cfaf1dff9b47c3bb6755290aa23bedb80c9ef2 Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Thu, 19 Sep 2024 16:53:20 +0100 Subject: [PATCH] [clang-tools-extra] Fix add_clang_library usage If a add_clang_

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread Nico Weber via cfe-commits
nico wrote: Looks like this breaks tests on Mac: http://45.33.8.238/macm1/92471/step_6.txt Please take a look and revert for now if it takes a while to fix. https://github.com/llvm/llvm-project/pull/76838 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang][wasm] Replace the target iminmax intrinsics with the equivalent generic `__builtin_elementwise_min/max` intrinsics (PR #109259)

2024-09-19 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. Great, thank you! https://github.com/llvm/llvm-project/pull/109259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][wasm] Replace the target integer add saturate intrinsics with the equivalent generic `__builtin_elementwise_add_sat` intrinsics (PR #109269)

2024-09-19 Thread Thomas Lively via cfe-commits
https://github.com/tlively approved this pull request. LGTM. FWIW, I'm not aware of any special reason why `wasm_sub_sat` should be any different. https://github.com/llvm/llvm-project/pull/109269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sarah Spall (spall) Changes Make Constant Arrays in HLSL assignable. Closes #109043 --- Full diff: https://github.com/llvm/llvm-project/pull/109323.diff 6 Files Affected: - (modified) clang/include/clang/AST/CanonicalType.h (+1) - (m

[clang] [HLSL] Array by-value assignment (PR #109323)

2024-09-19 Thread Sarah Spall via cfe-commits
https://github.com/spall created https://github.com/llvm/llvm-project/pull/109323 Make Constant Arrays in HLSL assignable. Closes #109043 >From b24aed9771a415a4dc896c48cfc0481574a0773c Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Wed, 18 Sep 2024 22:19:07 + Subject: [PATCH 1/2] enabl

[clang] [llvm] [clang][OpenMP] Add codegen for scope directive (PR #109197)

2024-09-19 Thread David Pagan via cfe-commits
https://github.com/ddpagan closed https://github.com/llvm/llvm-project/pull/109197 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread Pranav Bhandarkar via cfe-commits
https://github.com/bhandarkar-pranav created https://github.com/llvm/llvm-project/pull/109329 This PR is a fix for issue [#109328](https://github.com/llvm/llvm-project/issues/109328). libclangSerializaton.so is needed for building clang driver unittests after https://github.com/llvm/llvm-proje

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Pranav Bhandarkar (bhandarkar-pranav) Changes This PR is a fix for issue [#109328](https://github.com/llvm/llvm-project/issues/109328). libclangSerializaton.so is needed for building clang driver unittests

[clang] [Clang] - Add libclangSerialization to clang driver unittests (PR #109329)

2024-09-19 Thread Pranav Bhandarkar via cfe-commits
https://github.com/bhandarkar-pranav edited https://github.com/llvm/llvm-project/pull/109329 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add toolchain for X86_64 UEFI target (PR #76838)

2024-09-19 Thread Pranav Bhandarkar via cfe-commits
bhandarkar-pranav wrote: Hi @Prabhuk, I am seeing this issue https://github.com/llvm/llvm-project/issues/109328 after this PR. Here is a proposed [fix](https://github.com/llvm/llvm-project/pull/109329). Could you please check? https://github.com/llvm/llvm-project/pull/76838 __

[clang] [analyzer] [MallocChecker] Fix Store modification in `checkPreCall` (PR #109337)

2024-09-19 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag created https://github.com/llvm/llvm-project/pull/109337 This is small follow-up for #106081 While trying to add sanity check for `Enviroment` and `Store` being consistent during `checkPostCall` and `checkPreCall` I found out that `MallocChecker` still violates that

[clang] [llvm] [BPF] Add load-acquire and store-release instructions under -mcpu=v5 (PR #108636)

2024-09-19 Thread Peilin Ye via cfe-commits
https://github.com/peilin-ye edited https://github.com/llvm/llvm-project/pull/108636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk created https://github.com/llvm/llvm-project/pull/109364 Reverts llvm/llvm-project#109340 Addressing the failed MAC Clang unit test as part of this reland. >From b83aea6a5853a5a532d9203cc90ee96dfedc418f Mon Sep 17 00:00:00 2001 From: Prabhuk Date: Thu, 19 Sep 2024 1

[clang] Reland "[Driver] Add toolchain for X86_64 UEFI target" (PR #109364)

2024-09-19 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/109364 >From b83aea6a5853a5a532d9203cc90ee96dfedc418f Mon Sep 17 00:00:00 2001 From: Prabhuk Date: Thu, 19 Sep 2024 19:53:59 -0700 Subject: [PATCH 1/2] Revert "Revert "[Driver] Add toolchain for X86_64 UEFI target" (#

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-09-19 Thread Greg Roth via cfe-commits
@@ -19,20 +19,20 @@ using namespace llvm; static bool finalizeLinkage(Module &M) { - SmallPtrSet EntriesAndExports; + SmallPtrSet Funcs; // Find all entry points and export functions for (Function &EF : M.functions()) { -if (!EF.hasFnAttribute("hlsl.shader") && !

  1   2   3   4   5   >