[clang] [APINotes] Add SWIFT_RETURNS_(UN)RETAINED support to APINotes (PR #118938)

2024-12-05 Thread via cfe-commits
https://github.com/fahadnayyar created https://github.com/llvm/llvm-project/pull/118938 Adding support to APINotes to annotate C++ methods and functions with `swift_attr("returns_retained")` and `swift_attr("returns_unretained")` rdar://141007510 >From 3785e5cedbf2434566a62b7750a7ec48ccaa1fe1

[clang] [Clang] [NFC] Migrate visitors in ARCMigrate (PR #116792)

2024-12-05 Thread via cfe-commits
https://github.com/Sirraide closed https://github.com/llvm/llvm-project/pull/116792 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] [NFC] Migrate visitors in ARCMigrate (PR #116792)

2024-12-05 Thread via cfe-commits
Sirraide wrote: > this is now dead code, and we intend to open a PR to remove it Alright, in that case, I’ll close this and go ahead and open a PR myself to remove it myself while I’m at it. https://github.com/llvm/llvm-project/pull/116792 ___ cfe-co

[clang] da24c02 - [clang-repl] Remove redundant shared flag while running clang-repl in browser (#118107)

2024-12-05 Thread via cfe-commits
Author: Anutosh Bhat Date: 2024-12-06T08:35:00+01:00 New Revision: da24c02466e4d3201887806e038eb71f45bd08ee URL: https://github.com/llvm/llvm-project/commit/da24c02466e4d3201887806e038eb71f45bd08ee DIFF: https://github.com/llvm/llvm-project/commit/da24c02466e4d3201887806e038eb71f45bd08ee.diff

[clang] [clang-repl] Remove redundant shared flag while running clang-repl in browser (PR #118107)

2024-12-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/118107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-repl] Remove redundant shared flag while running clang-repl in browser (PR #118107)

2024-12-05 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev approved this pull request. Lgtm! https://github.com/llvm/llvm-project/pull/118107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e25c556 - [clang-format][NFC] Reformat git-clang-format with `black -l80`

2024-12-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-12-05T23:18:24-08:00 New Revision: e25c556abeb9ae5f82da42cd26b9dae8462a7197 URL: https://github.com/llvm/llvm-project/commit/e25c556abeb9ae5f82da42cd26b9dae8462a7197 DIFF: https://github.com/llvm/llvm-project/commit/e25c556abeb9ae5f82da42cd26b9dae8462a7197.diff LOG:

[clang] [flang] Reland "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (PR #118933)

2024-12-05 Thread Yusuke MINATO via cfe-commits
yus3710-fj wrote: Please note that there is a (non-functional) change from the previous patch: 2e6180ed4799230c5e25f85a7c633ff42f3d78ae https://github.com/llvm/llvm-project/pull/118933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang] [flang] Reland "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (PR #118933)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-flang-openmp Author: Yusuke MINATO (yus3710-fj) Changes This relands #110063. The performance issue on 503.bwaves_r is found not to be related to the patch, and is resolved by fbd89bcc when LTO is enabled. --- Patch is 107.5

[clang] [flang] Reland "[flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv" (PR #118933)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-fir-hlfir Author: Yusuke MINATO (yus3710-fj) Changes This relands #110063. The performance issue on 503.bwaves_r is found not to be related to the patch, and is resolved by fbd89bcc when LTO is enabled. --- Patch is 107.53 KiB, truncated to 20.0

[clang] [AST] Remove clang/AST/CommentDiagnostic.h (PR #117499)

2024-12-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/117499 >From e9427756de508dc386a10ee9ee19cc4733a40465 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sun, 24 Nov 2024 09:14:54 -0800 Subject: [PATCH 1/2] [AST] Remove clang/AST/CommentDiagnostic.h Since: c

[clang] [CodeGen] Migrate away from PointerUnion::{is, get} (NFC) (PR #118600)

2024-12-05 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/118600 >From 651f7ab264c5fd2b1fdd740b3d84e2aef4681b4b Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 3 Dec 2024 13:59:08 -0800 Subject: [PATCH 1/2] [CodeGen] Migrate away from PointerUnion::{is,get} (NFC)

[clang] [CodeGen] Migrate away from PointerUnion::{is, get} (NFC) (PR #118600)

2024-12-05 Thread Kazu Hirata via cfe-commits
@@ -37,8 +37,8 @@ void ConstantInitFuture::abandon() { void ConstantInitFuture::installInGlobal(llvm::GlobalVariable *GV) { assert(Data && "installing null future"); - if (Data.is()) { -GV->setInitializer(Data.get()); + if (auto *C = dyn_cast(Data)) { +GV->setIniti

[clang] [clang-repl] Remove redundant shared flag while running clang-repl in browser (PR #118107)

2024-12-05 Thread Anutosh Bhat via cfe-commits
anutosh491 wrote: cc @vgvassilev Now that 19.1.5 is out. We can run clang-repl in the browser. And this flag is just adding redundancy and doesn't play a role. Small change. Should be ready ! https://github.com/llvm/llvm-project/pull/118107 ___ cfe

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-12-05 Thread Serge Pavlov via cfe-commits
@@ -273,29 +306,6 @@ void InstrProfCallsite::setCallee(Value *Callee) { setArgOperand(4, Callee); } -std::optional ConstrainedFPIntrinsic::getRoundingMode() const { - unsigned NumOperands = arg_size(); - Metadata *MD = nullptr; - auto *MAV = dyn_cast(getArgOperand(NumOper

[clang] [clang-format] Add test to ensure formatting options docs are updated (PR #118154)

2024-12-05 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Thanks! https://github.com/llvm/llvm-project/pull/118154 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-05 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak edited https://github.com/llvm/llvm-project/pull/118249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-05 Thread Malavika Samak via cfe-commits
@@ -8,6 +8,5 @@ // main function int main(int argc, char *argv[]) { // expected-warning{{'argv' is an unsafe pointer used for buffer access}} char tmp; - tmp = argv[5][5];// expected-note{{used in buffer access here}} \ -

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-05 Thread Malavika Samak via cfe-commits
@@ -52,3 +52,37 @@ void constant_id_string(unsigned idx) { unsafe_char = ""[1]; //expected-warning{{unsafe buffer access}} unsafe_char = ""[idx]; //expected-warning{{unsafe buffer access}} } + +typedef float Float4x4[4][4]; + +// expected-warning@+1 {{'matrix' is an unsafe

[clang] [-Wunsafe-buffer-usage] Suppress warning for multi-dimensional constant arrays (PR #118249)

2024-12-05 Thread Malavika Samak via cfe-commits
@@ -433,37 +433,36 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { //already duplicated // - call both from Sema and from here - const auto *BaseDRE = - dyn_cast(Node.getBase()->IgnoreParenImpCasts()); - const auto *SLiteral = - dyn_cast(Node.ge

[clang] [clang][AArch64] Avoid a crash when a non-reserved register is used (PR #117419)

2024-12-05 Thread KAWASHIMA Takahiro via cfe-commits
https://github.com/kawashima-fj approved this pull request. LGTM. Thanks! https://github.com/llvm/llvm-project/pull/117419 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
@@ -41,6 +41,10 @@ class LLVM_LIBRARY_VISIBILITY ARCTargetInfo : public TargetInfo { MacroBuilder &Builder) const override; ArrayRef getTargetBuiltins() const override { return {}; } chandlerc wrote: Doh, yes. I meant to remove the

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc updated https://github.com/llvm/llvm-project/pull/118734 >From 73a0b5c796881d1e52f8336eb69f678fd4c9f4c4 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 28 Nov 2024 09:56:40 + Subject: [PATCH 1/2] Switch builtin strings to use string tables MIME-Versio

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -41,6 +41,10 @@ class LLVM_LIBRARY_VISIBILITY ARCTargetInfo : public TargetInfo { MacroBuilder &Builder) const override; ArrayRef getTargetBuiltins() const override { return {}; } topperc wrote: Should this override of getTargetB

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Craig Topper via cfe-commits
https://github.com/topperc edited https://github.com/llvm/llvm-project/pull/118734 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-05 Thread Mike Hommey via cfe-commits
glandium wrote: We're getting a similar crash bisected to this change as well, also with a huge original file. Funnily enough, a debug build hits an assertion that happens even without this change, so I'm going to dig into that before even trying to reduce the crasher. https://github.com/llvm

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc updated https://github.com/llvm/llvm-project/pull/118734 >From 73a0b5c796881d1e52f8336eb69f678fd4c9f4c4 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 28 Nov 2024 09:56:40 + Subject: [PATCH] Switch builtin strings to use string tables MIME-Version: 1

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 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 983f88c1ec9cee51cf0fb4e6a0f00074a7cf1b60 16e70ef753de962e76b5232912094a51ca24 --e

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
chandlerc wrote: Updated to use the GCC diagnostic push the same as TableGen does for long string literals. Also added Aaron to take a look as well (unless he's comfortable already). https://github.com/llvm/llvm-project/pull/118734 ___ cfe-commits ma

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Chandler Carruth via cfe-commits
https://github.com/chandlerc updated https://github.com/llvm/llvm-project/pull/118734 >From 16e70ef753de962e76b5232912094a51ca24 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 28 Nov 2024 09:56:40 + Subject: [PATCH] Switch builtin strings to use string tables MIME-Version: 1

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-05 Thread Alexander Kornienko via cfe-commits
alexfh wrote: The original file is huge and template heavy, so reduction will take some time. I wonder if you can spot something obviously wrong in the commit given the information above? Failing that, can we revert in the meantime? https://github.com/llvm/llvm-project/pull/118455

[clang] [clang][AArch64] Avoid a crash when a non-reserved register is used (PR #117419)

2024-12-05 Thread Igor Kudrin via cfe-commits
@@ -232,13 +232,23 @@ bool AArch64TargetInfo::validateTarget(DiagnosticsEngine &Diags) const { bool AArch64TargetInfo::validateGlobalRegisterVariable( StringRef RegName, unsigned RegSize, bool &HasSizeMismatch) const { - if ((RegName == "sp") || RegName.starts_with("x"))

[clang] fb2cbc0 - [clang-format] Reformat Python script git-clang-format with black

2024-12-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-12-05T20:26:02-08:00 New Revision: fb2cbc00e0b27bc25afd8c831151333a41820bc0 URL: https://github.com/llvm/llvm-project/commit/fb2cbc00e0b27bc25afd8c831151333a41820bc0 DIFF: https://github.com/llvm/llvm-project/commit/fb2cbc00e0b27bc25afd8c831151333a41820bc0.diff LOG:

[clang] [clang][AArch64] Avoid a crash when a non-reserved register is used (PR #117419)

2024-12-05 Thread Igor Kudrin via cfe-commits
https://github.com/igorkudrin updated https://github.com/llvm/llvm-project/pull/117419 >From 54fc788cca22b1b30313f4349d9ef2ba8cf58079 Mon Sep 17 00:00:00 2001 From: Igor Kudrin Date: Fri, 22 Nov 2024 21:36:54 -0800 Subject: [PATCH 1/3] [clang][AArch64] Avoid a crash when a non-reserved registe

[clang] 9a5946c - [clang-format] Add --directory option to dump_format_help.py

2024-12-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-12-05T20:16:09-08:00 New Revision: 9a5946cdba91ce9801643711186dbffddda9f111 URL: https://github.com/llvm/llvm-project/commit/9a5946cdba91ce9801643711186dbffddda9f111 DIFF: https://github.com/llvm/llvm-project/commit/9a5946cdba91ce9801643711186dbffddda9f111.diff LOG:

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 ready_for_review https://github.com/llvm/llvm-project/pull/118236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: CI is green. Requesting review. https://github.com/llvm/llvm-project/pull/118236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread Yanzuo Liu via cfe-commits
@@ -239,7 +239,7 @@ C++2c implementation status Remove Deprecated Array Comparisons from C++26 https://wg21.link/P2865R6";>P2865R6 - No + Clang 20 zwuis wrote: ```suggestion Clang 20 ``` https://github.com/llvm/llvm-project/pull/118872

[clang] [clang-format] Add test to ensure formatting options docs are updated (PR #118154)

2024-12-05 Thread Owen Pan via cfe-commits
owenca wrote: > When running the new testcase the file plurals.txt, which is in the repo, is > opened for writing? Is this really desired? Fixed in 74d29c6393df606e98e7c42b9a97f56f335e3ffb. https://github.com/llvm/llvm-project/pull/118154 ___ cfe-com

[clang] [llvm] [clang-format] Add cmake target clang-format-style-options for updating ClangFormatStyleOptions.rst (PR #111513)

2024-12-05 Thread Owen Pan via cfe-commits
owenca wrote: > If CLANG_INCLUDE_DOCS=OFF then this should be skipped, otherwise the build > will fail if llvm/clang/docs doesn't exist. This was fixed in f0b09dfd4c84fe8ffbc726da39ee5255e1a22a2f, which also addressed an issue that ClangFormatStyleOptions.rst would be deleted by `ninja clean`

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] f0b09df - [clang-format] Add cmake target clang-format-style-options

2024-12-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-12-05T19:38:34-08:00 New Revision: f0b09dfd4c84fe8ffbc726da39ee5255e1a22a2f URL: https://github.com/llvm/llvm-project/commit/f0b09dfd4c84fe8ffbc726da39ee5255e1a22a2f DIFF: https://github.com/llvm/llvm-project/commit/f0b09dfd4c84fe8ffbc726da39ee5255e1a22a2f.diff LOG:

[clang] [Clang] Deleting an incomplete enum type is not an error (PR #118455)

2024-12-05 Thread Alexander Kornienko via cfe-commits
alexfh wrote: Heads up: we're seeing clang crashes after this revision. Assertions-enabled clang fails this assertion (probably related?): ``` assert.h assertion failed at clang/lib/Sema/SemaLookup.cpp:2408 in bool clang::Sema::LookupQualifiedName(LookupResult &, DeclContext *, bool): (!isa(Lo

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Carlo Cabrera via cfe-commits
https://github.com/carlocab edited https://github.com/llvm/llvm-project/pull/117573 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][driver] Special care for linker flags in config files (PR #117573)

2024-12-05 Thread Carlo Cabrera via cfe-commits
@@ -82,3 +82,29 @@ // CHECK-TWO-CONFIGS: -isysroot // CHECK-TWO-CONFIGS-SAME: /opt/data // CHECK-TWO-CONFIGS-SAME: -Wall + +//--- The linker input flags should be moved to the end of input list and appear only when linking. +// RUN: %clang --target=aarch64-unknown-linux-gnu --

[clang] [llvm] [clang-format] Add cmake target clang-format-style-options for updating ClangFormatStyleOptions.rst (PR #111513)

2024-12-05 Thread Owen Pan via cfe-commits
owenca wrote: > ``` > FAILED: > /var/llvm-compile-time-tracker/llvm-project/clang/docs/ClangFormatStyleOptions.rst > > cd /var/llvm-compile-time-tracker/llvm-project/clang/docs/tools && > /usr/bin/python3.10 dump_format_style.py > Traceback (most recent call last): > File > "/var/llvm-comp

[clang] 74d29c6 - [clang-format] Open plurals.txt in read-only mode in dump_format_style.py

2024-12-05 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2024-12-05T19:25:32-08:00 New Revision: 74d29c6393df606e98e7c42b9a97f56f335e3ffb URL: https://github.com/llvm/llvm-project/commit/74d29c6393df606e98e7c42b9a97f56f335e3ffb DIFF: https://github.com/llvm/llvm-project/commit/74d29c6393df606e98e7c42b9a97f56f335e3ffb.diff LOG:

[clang] [flang] [clang][driver] When -fveclib=ArmPL flag is in use, always link against libamath (PR #116432)

2024-12-05 Thread Fangrui Song via cfe-commits
@@ -490,6 +490,35 @@ void tools::AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs, else A.renderAsInput(Args, CmdArgs); } + if (const Arg *A = Args.getLastArg(options::OPT_fveclib)) { +const llvm::Triple &Triple = TC.getTriple(); +StringRef

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-05 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/113049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-05 Thread via cfe-commits
https://github.com/yronglin updated https://github.com/llvm/llvm-project/pull/113049 >From 804b1032cb23cea8fa705a0d2130b1f95185c949 Mon Sep 17 00:00:00 2001 From: yronglin Date: Wed, 20 Nov 2024 23:45:59 +0800 Subject: [PATCH 1/7] [clang] Fix a crash issue that caused by handling of fields wit

[clang] [clang] Fix a crash issue that caused by handling of fields with initializers in nested anonymous unions (PR #113049)

2024-12-05 Thread via cfe-commits
@@ -5563,6 +5563,12 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation CallLoc, ExprResult Sema::BuildCXXDefaultInitExpr(SourceLocation Loc, FieldDecl *Field) { assert(Field->hasInClassInitializer()); + // We do not want to aggressively cutoff parsing. Try to recov

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

2024-12-05 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: Sent https://github.com/llvm/llvm-project/commit/b5bd1928c6d43bc525a4e3fb65d2c750d61e and see https://github.com/llvm/llvm-project/pull/83237#issuecomment-2521945547 https://github.com/llvm/llvm-project/pull/83108 ___ cfe-commit

[clang] D41416: [modules] [pch] Do not deserialize all lazy template specializations when looking for one. (PR #83108)

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

[clang] b5bd192 - [Serialization] Support load lazy specialization lazily

2024-12-05 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2024-12-06T10:52:35+08:00 New Revision: b5bd1928c6d43bc525a4e3fb65d2c750d61e URL: https://github.com/llvm/llvm-project/commit/b5bd1928c6d43bc525a4e3fb65d2c750d61e DIFF: https://github.com/llvm/llvm-project/commit/b5bd1928c6d43bc525a4e3fb65d2c750d61e.diff LO

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: Fixed one additional test failure. https://github.com/llvm/llvm-project/pull/118236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/118236 >From 9fe707f202719ea4c05934eafaa58c11efd01cbd Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 1 Dec 2024 19:58:03 -0500 Subject: [PATCH] [clang] [Sema] Preserve nested name specifier prefix in Me

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Shilei Tian via cfe-commits
shiltian wrote: Supposedly you can revert the revert to get the reapply. https://github.com/llvm/llvm-project/pull/118907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: I updated the patch to do the wrapping into `ElaboratedType` even if a prefix isn't present, and updated the various failing tests accordingly. I haven't added an assert, as explained in the previous comment. https://github.com/llvm/llvm-project/pull/118236 __

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/118236 >From 4594891422173161267c711ff133676fb9e8ebb1 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Sun, 1 Dec 2024 19:58:03 -0500 Subject: [PATCH] [clang] [Sema] Preserve nested name specifier prefix in Me

[clang] [clang-tools-extra] [clang] [Sema] Preserve nested name specifier prefix in MemberPointerType (PR #118236)

2024-12-05 Thread Nathan Ridge via cfe-commits
@@ -5347,13 +5347,16 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state, case NestedNameSpecifier::TypeSpec: case NestedNameSpecifier::TypeSpecWithTemplate: - ClsType = QualType(NNS->getAsType(), 0); + const Type *N

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-12-05 Thread Chuanqi Xu via cfe-commits
@@ -1976,14 +1976,16 @@ TemplateDeclInstantiator::VisitFunctionTemplateDecl(FunctionTemplateDecl *D) { if (!InstParams) return nullptr; + // Use canonical templated decl because only canonical decl has body + // if declarations were merged during loading from modules.

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-12-05 Thread Chuanqi Xu via cfe-commits
@@ -10057,15 +10057,18 @@ void ASTReader::finishPendingActions() { // For a function defined inline within a class template, force the // canonical definition to be the one inside the canonical definition of // the template. This ensures that we instantiate fr

[clang] [C++20][Modules] Load function body from the module that gives canonical decl (PR #111992)

2024-12-05 Thread Chuanqi Xu via cfe-commits
@@ -10057,15 +10057,18 @@ void ASTReader::finishPendingActions() { // For a function defined inline within a class template, force the // canonical definition to be the one inside the canonical definition of // the template. This ensures that we instantiate fr

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Jun Wang via cfe-commits
jwanggit86 wrote: > Should have the git generated "Reapply..." message with reference to the > original I didn't notice that. Do you want me to put "Reapply " in the msg? https://github.com/llvm/llvm-project/pull/118907 ___ cfe-commits mailing list c

[clang] [flang] [flang] Integrate the option -flang-experimental-integer-overflow into -fno-wrapv (PR #110063)

2024-12-05 Thread Yusuke MINATO via cfe-commits
yus3710-fj wrote: Thank you for the informantion, @tblah. I also confirmed that the regression doesn't happen after fbd89bcc6647ed611e579d8f9c38c97b8e6f7936. I'm a little concerned that the regression still occurs when LTO is diabled. However, I'd like to reland this patch because this isn't t

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

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

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -103,7 +112,12 @@ class LLVM_LIBRARY_VISIBILITY StaticLibTool : public Tool { class LLVM_LIBRARY_VISIBILITY Linker final : public Tool { public: - Linker(const ToolChain &TC) : Tool("baremetal::Linker", "ld.lld", TC) {} + Linker(const ToolChain &TC) toppe

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -103,7 +112,12 @@ class LLVM_LIBRARY_VISIBILITY StaticLibTool : public Tool { class LLVM_LIBRARY_VISIBILITY Linker final : public Tool { public: - Linker(const ToolChain &TC) : Tool("baremetal::Linker", "ld.lld", TC) {} + Linker(const ToolChain &TC) + : Tool("baremet

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); - AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA); + if (!D

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -503,12 +624,22 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA, const llvm::Triple::ArchType Arch = TC.getArch(); const llvm::Triple &Triple = getToolChain().getEffectiveTriple(); - AddLinkerInputs(TC, Inputs, Args, CmdArgs, JA); + if (!D

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -325,6 +429,19 @@ void BareMetal::addClangTargetOptions(const ArgList &DriverArgs, CC1Args.push_back("-nostdsysteminc"); } +void BareMetal::addLibStdCxxIncludePaths( +const llvm::opt::ArgList &DriverArgs, +llvm::opt::ArgStringList &CC1Args) const { + if (GCCInst

[clang] [RISCV] Merging RISCVToolChain and BareMetal toolchains (PR #118809)

2024-12-05 Thread Craig Topper via cfe-commits
@@ -291,6 +365,36 @@ BareMetal::OrderedMultilibs BareMetal::getOrderedMultilibs() const { return llvm::reverse(Default); } +ToolChain::CXXStdlibType BareMetal::GetDefaultCXXStdlibType() const { + if (getTriple().isRISCV()) { topperc wrote: Could this be s

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Shilei Tian via cfe-commits
shiltian wrote: I was thinking this PR looks familiar... https://github.com/llvm/llvm-project/pull/118907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Fix uninitialized scalar field in constructor. (PR #118324)

2024-12-05 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Do you still want an issue to be opened? I sent out a follow-up PR at https://github.com/llvm/llvm-project/pull/118906 to add a comment describing the situations in which `IdxContents` is used, to avoid future confusion. https://github.com/llvm/llvm-project/pull/118324

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Matt Arsenault via cfe-commits
arsenm wrote: Should have the git generated "Reapply..." message with reference to the original https://github.com/llvm/llvm-project/pull/118907 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread Jun Wang via cfe-commits
jwanggit86 wrote: [PR 94647](https://github.com/llvm/llvm-project/pull/94647) was found to cause build problems after merge with upstream. It has since been reverted by commit 1ef9410a96c1d9669a6feaf03fcab8d0a4a13bd5. This PR fixes the tests that caused the build problems. https://github.com/

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes This is a follow-up to https://github.com/llvm/llvm-project/pull/118324 to document that the `Dex` fields `Files` and `IdxContents` are intentionally only used in some cases, and describe what those

[clang-tools-extra] 9ccde12 - [clang] Compute accurate begin location for CallExpr with explicit object parameter (#117841)

2024-12-05 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-12-05T19:52:23-05:00 New Revision: 9ccde12f5eeb91152900082a2ae839e2a9702b31 URL: https://github.com/llvm/llvm-project/commit/9ccde12f5eeb91152900082a2ae839e2a9702b31 DIFF: https://github.com/llvm/llvm-project/commit/9ccde12f5eeb91152900082a2ae839e2a9702b31.diff

[clang] [clang-tools-extra] [clang] Compute accurate begin location for CallExpr with explicit object parameter (PR #117841)

2024-12-05 Thread Nathan Ridge via cfe-commits
@@ -1639,11 +1639,19 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + if (const auto *Method = + dyn_cast_if_present(getCalleeDecl()); HighCommander4 wrote: > heh I think ther

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #118907)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Jun Wang (jwanggit86) Changes The AMDGPUAnnotateKernelFeatures pass infers the "amdgpu-calls" and "amdgpu-stack-objects" attributes, which are used to infer whether we need to initialize flat scratch. This is, however, not precise.

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes This is a follow-up to https://github.com/llvm/llvm-project/pull/118324 to document that the `Dex` fields `Files` and `IdxContents` are intentionally only used in some cases, and describe

[clang-tools-extra] [clangd] Document the cases in which Dex::Files and IdxContents are populated (PR #118906)

2024-12-05 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/118906 This is a follow-up to https://github.com/llvm/llvm-project/pull/118324 to document that the `Dex` fields `Files` and `IdxContents` are intentionally only used in some cases, and describe what those case

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-05 Thread Matt Arsenault via cfe-commits
arsenm wrote: > llvm.trunc is currently marked IntrNoMem in Intrinsics.td; you'll need to > update that if you want it to read/modify FP state. (Trying to override the > default by sticking attributes on top doesn't work properly, as far as I > know.) I think we need a dedicated fp env attrib

[libclc] [libclc] Move several integer functions to CLC library (PR #116786)

2024-12-05 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,21 @@ +#ifndef __CLC_INTEGER_CLC_CLZ_H__ +#define __CLC_INTEGER_CLC_CLZ_H__ + +#if defined(CLC_CLSPV) || defined(CLC_SPIRV) +// clspv and spir-v targets provide their own OpenCL-compatible clz +#define __clc_clz clz arsenm wrote: > In this context of t

[clang] Switch builtin strings to use string tables (PR #118734)

2024-12-05 Thread Richard Smith via cfe-commits
https://github.com/zygoloid approved this pull request. LGTM too. I do wonder if we can make tablegen generate the data directly in the desired format here (perhaps with some additional `.td` files to define exactly which files we want to include in which targets and to define the placeholder

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-12-05 Thread Petr Hosek via cfe-commits
@@ -0,0 +1,113 @@ +//===--- Mustache.h -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[clang] [Clang] [NFC] Migrate visitors in ARCMigrate (PR #116792)

2024-12-05 Thread John McCall via cfe-commits
rjmccall wrote: Apple actually removed this migrator from Xcode 16. As far as Apple is concerned, this is now dead code, and we intend to open a PR to remove it (but thank you for the prompt!). https://github.com/llvm/llvm-project/pull/116792 ___ cfe

[clang] [llvm] [DRAFT] Root SIgnatures add parser (PR #118895)

2024-12-05 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/118895 >From 8d164f91702c820d7a36a6108a2c04345dad7a0b Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 26 Nov 2024 00:07:27 + Subject: [PATCH 1/7] adding attrb --- clang/include/clang/Basic/Attr.td |

[clang] [llvm] [DRAFT] Root SIgnatures add parser (PR #118895)

2024-12-05 Thread via cfe-commits
https://github.com/joaosaffran created https://github.com/llvm/llvm-project/pull/118895 None >From 8d164f91702c820d7a36a6108a2c04345dad7a0b Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 26 Nov 2024 00:07:27 + Subject: [PATCH 1/6] adding attrb --- clang/include/clang/Basic/Attr.t

[clang-tools-extra] 63dfe70 - [clang-tidy][NFC] move AST_MATCHER to anonymous namespace in InfiniteLoopCheck (#118820)

2024-12-05 Thread via cfe-commits
Author: Congcong Cai Date: 2024-12-06T06:46:03+08:00 New Revision: 63dfe70b224b562f4e5a4e8367353127684584df URL: https://github.com/llvm/llvm-project/commit/63dfe70b224b562f4e5a4e8367353127684584df DIFF: https://github.com/llvm/llvm-project/commit/63dfe70b224b562f4e5a4e8367353127684584df.diff

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2024-12-05 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/118800 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] Destroying delete and deleted destructors (PR #118800)

2024-12-05 Thread Richard Smith via cfe-commits
@@ -3768,6 +3768,28 @@ Sema::ActOnCXXDelete(SourceLocation StartLoc, bool UseGlobal, DeclarationName DeleteName = Context.DeclarationNames.getCXXOperatorName( ArrayForm ? OO_Array_Delete : OO_Delete); +// C++20 [expr.delete]p6: If

[clang-tools-extra] [clang-tidy][NFC] move AST_MATCHER to anonymous namespace in InfiniteLoopCheck (PR #118820)

2024-12-05 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/118820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix compilation for the x32 ABI. (PR #116608)

2024-12-05 Thread Alex Rønne Petersen via cfe-commits
alexrp wrote: ping https://github.com/llvm/llvm-project/pull/116608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind] Fix a typo in debug print (PR #118856)

2024-12-05 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov closed https://github.com/llvm/llvm-project/pull/118856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] 426aecb - [libunwind] Fix a typo in debug print (#118856)

2024-12-05 Thread via cfe-commits
Author: Sergei Barannikov Date: 2024-12-06T01:22:14+03:00 New Revision: 426aecb7e9370b4f2f42d6c59652794b4bfd2fea URL: https://github.com/llvm/llvm-project/commit/426aecb7e9370b4f2f42d6c59652794b4bfd2fea DIFF: https://github.com/llvm/llvm-project/commit/426aecb7e9370b4f2f42d6c59652794b4bfd2fea.d

[clang] [llvm] Reimplement constrained 'trunc' using operand bundles (PR #118253)

2024-12-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: llvm.trunc is currently marked IntrNoMem in Intrinsics.td; you'll need to update that if you want it to read/modify FP state. (Trying to override the default by sticking attributes on top doesn't work properly, as far as I know.) https://github.com/llvm/llvm-project/pull/

[clang-tools-extra] [NFC] Avoid data race condition. (PR #118664)

2024-12-05 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann requested changes to this pull request. https://github.com/llvm/llvm-project/pull/118664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [NFC] Avoid data race condition. (PR #118664)

2024-12-05 Thread Tom Honermann via cfe-commits
@@ -501,6 +501,7 @@ class PreambleThread { } { +std::unique_lock Lock(Mutex); WithContext Guard(std::move(CurrentReq->Ctx)); tahonermann wrote: Unfortunately, I don't think this solves the issue by itself. Just prior to exiting t

[clang] [Clang] Warning as error Array Comparisons from C++26 (PR #118872)

2024-12-05 Thread Erich Keane via cfe-commits
@@ -428,6 +428,9 @@ New Compiler Flags - The ``-Warray-compare`` warning has been added to warn about array comparison on versions older than C++20. +- The ``-Warray-compare-cxx26`` warning has been added to warn about array comparison + starting from C++26, this warn is e

  1   2   3   4   >