[clang] [clang] Emit bad shift warnings (PR #70307)

2024-06-24 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From 6d5fdc817db7216577429e5949bbaa7e6cd3648f Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[libclc] [llvm] [libclc] Revise IDE folder structure (PR #89746)

2024-06-24 Thread Fraser Cormack via cfe-commits
@@ -394,6 +401,7 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} ) DEPENDS ${builtins_link_lib} ) add_custom_target( "prepare-${spv_suffix}" ALL DEPENDS "${spv_suffix}" ) + set_target_properties( "prepare-${spv_suffix}" PROPERTIES FOLDER "libclc/Sourcegenning

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-24 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw updated https://github.com/llvm/llvm-project/pull/94352 >From ff839bef048a65760f4cd0e9abafe11cfebd9362 Mon Sep 17 00:00:00 2001 From: Yingwei Zheng Date: Tue, 4 Jun 2024 21:08:27 +0800 Subject: [PATCH 01/10] [RISCV] Add support for getHostCPUFeatures using hwprobe C

[clang] [analyzer] Check the correct first and last elements in cstring.UninitializedRead (PR #95408)

2024-06-24 Thread Donát Nagy via cfe-commits
@@ -393,6 +401,162 @@ ProgramStateRef CStringChecker::checkNonNull(CheckerContext &C, return stateNonNull; } +static std::optional getIndex(ProgramStateRef State, + const ElementRegion *ER, CharKind CK) { + SValBuilder &SVB = State->get

[clang] Pass LangOpts from CompilerInstance to DependencyScanningWorker (PR #93753)

2024-06-24 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > > I guess the general question is - is it acceptable to have the Scanner > > > > operating in a language standard different than the passed in language > > > > mode and different than the compiler language standard? > > > > > > > > > I think that is acceptable. It is

[clang] clang: Relax LangOpts checks when lexing quoted numbers during preprocessing (PR #95798)

2024-06-24 Thread Aaron Ballman via cfe-commits
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char *CurPtr) { } // If we have a digit separator, continue. - if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) { + if (C == '\'' && + (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing

[clang] [PPC][InlineASM] Mark the 'a' constraint as unsupported (PR #96109)

2024-06-24 Thread Kamau Bridgeman via cfe-commits
https://github.com/kamaub updated https://github.com/llvm/llvm-project/pull/96109 >From 87983d169582bc5156220594e0fc4812f424bf75 Mon Sep 17 00:00:00 2001 From: Kamau Bridgeman Date: Wed, 19 Jun 2024 14:59:53 -0500 Subject: [PATCH 1/3] [PPC][InlineASM] Mark the 'a' constraint as unsupported 'a'

[clang] b8979c6 - [PPC][InlineASM] Mark the 'a' constraint as unsupported (#96109)

2024-06-24 Thread via cfe-commits
Author: Kamau Bridgeman Date: 2024-06-24T08:33:25-04:00 New Revision: b8979c6b13e9d4cb5051dd6f8ca772a20b14b428 URL: https://github.com/llvm/llvm-project/commit/b8979c6b13e9d4cb5051dd6f8ca772a20b14b428 DIFF: https://github.com/llvm/llvm-project/commit/b8979c6b13e9d4cb5051dd6f8ca772a20b14b428.dif

[clang] [PPC][InlineASM] Mark the 'a' constraint as unsupported (PR #96109)

2024-06-24 Thread Kamau Bridgeman via cfe-commits
https://github.com/kamaub closed https://github.com/llvm/llvm-project/pull/96109 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0cf1e66 - [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (#94642)

2024-06-24 Thread via cfe-commits
Author: Jan Voung Date: 2024-06-24T08:46:31-04:00 New Revision: 0cf1e662b13fb20d3897c5b9055c60b0de50beca URL: https://github.com/llvm/llvm-project/commit/0cf1e662b13fb20d3897c5b9055c60b0de50beca DIFF: https://github.com/llvm/llvm-project/commit/0cf1e662b13fb20d3897c5b9055c60b0de50beca.diff LOG

[clang] [clang] Skip auto-init on scalar vars that have a non-constant Init and no self-ref (PR #94642)

2024-06-24 Thread Jan Voung via cfe-commits
https://github.com/jvoung closed https://github.com/llvm/llvm-project/pull/94642 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)

2024-06-24 Thread via cfe-commits
alexfh wrote: Specifically, the problem is that we can't fix code that corresponds to case # 1 from the description, since it produces code corresponding to pattern # 2, which can't compile with current clang. Shipping fixes together with the compiler is not an option for us (and probably for

[clang] [Clang][SveEmitter] Split up TargetGuard into SVE and SME component. (PR #96482)

2024-06-24 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm created https://github.com/llvm/llvm-project/pull/96482 One reason to want to split this up is to simplify the code added in #93802, where it checks the SME streaming-mode requirements for a builtin by checking for the absence of SVE. If the target guards are s

[clang] [Clang][SveEmitter] Split up TargetGuard into SVE and SME component. (PR #96482)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sander de Smalen (sdesmalen-arm) Changes One reason to want to split this up is to simplify the code added in #93802, where it checks the SME streaming-mode requirements for a builtin by checking for the absence of SVE. If the target guard

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-24 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: Where is `diff-clang-tidy.py`? https://github.com/llvm/llvm-project/pull/96122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-24 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: I found it. It named `clang-tidy-diff.py` https://github.com/llvm/llvm-project/pull/96122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 edited https://github.com/llvm/llvm-project/pull/96122 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-06-24 Thread via cfe-commits
Sirraide wrote: > This change has some compile-time impact I was not expecting that. Hmm, I wonder what’s causing this. > Given that this is for a clang extension and not a conformance issue, I'm > inclined to revert. It might make sense to do that, yeah. Either way, we should investigate wha

[clang-tools-extra] [clang-tidy] add option to avoid "no checks enabled" error (PR #96122)

2024-06-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96122 >From 41993ea6903668c41eef8a4477f5914c894f7109 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Jun 2024 23:20:09 + Subject: [PATCH 1/8] [clang-tidy] add option to avoid "no checks enabled" erro

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-06-24 Thread via cfe-commits
Sirraide wrote: > I was not expecting that. Hmm, I wonder what’s causing this. I’m probably just stating the obvious here, but seeing as existing code obviously does not make use of effects, for compiling it to become slower, that means that we’re probably unconditionally executing code somewh

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-06-24 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Given that this is for a clang extension and not a conformance issue, I'm > inclined to revert. > > It might make sense to do that, yeah. Either way, we should investigate > what’s going on here. @AaronBallman wdyt? Definitely worth investigating, unsure whether this is

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-24 Thread Matt Arsenault via cfe-commits
@@ -2626,14 +2629,20 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { SmallVector OutputConstraintInfos; SmallVector InputConstraintInfos; + const FunctionDecl *FD = dyn_cast_or_null(CurCodeDecl); arsenm wrote: Where do you get dyn_cast_or_null i

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: It's really unfortunate to have to add all this asm handling to clang. Can't it rely on backend diagnostic remarks for this? https://github.com/llvm/llvm-project/pull/96363 ___ cfe-commits mailing list cfe-commits

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-24 Thread via cfe-commits
@@ -2626,14 +2629,20 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { SmallVector OutputConstraintInfos; SmallVector InputConstraintInfos; + const FunctionDecl *FD = dyn_cast_or_null(CurCodeDecl); Sirraide wrote: > Where do you get dyn_cast_or_nu

[clang] [clang][Sema] Fix crash on atomic builtins with incomplete type args (PR #96374)

2024-06-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/96374 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix crash on atomic builtins with incomplete type args (PR #96374)

2024-06-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for the fix! The changes should also come with a release note in `clang/docs/ReleaseNotes.rst` so users know about the improvement. https://github.com/llvm/llvm-project/pull/96374 ___ cfe-commits ma

[clang] [clang][Sema] Fix crash on atomic builtins with incomplete type args (PR #96374)

2024-06-24 Thread Aaron Ballman via cfe-commits
@@ -4570,7 +4570,8 @@ ExprResult Sema::BuildAtomicExpr(SourceRange CallRange, SourceRange ExprRange, } // Pointer to object of size zero is not allowed. - if (Context.getTypeInfoInChars(AtomTy).Width.isZero()) { + if (!AtomTy->isIncompleteType() && Aaro

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM still https://github.com/llvm/llvm-project/pull/95290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c1bde0a - [clang][ThreadSafety] Check trylock function success and return types (#95290)

2024-06-24 Thread via cfe-commits
Author: Dan McArdle Date: 2024-06-24T09:29:13-04:00 New Revision: c1bde0a2cb640b3607e9568b9a57b292e1f82666 URL: https://github.com/llvm/llvm-project/commit/c1bde0a2cb640b3607e9568b9a57b292e1f82666 DIFF: https://github.com/llvm/llvm-project/commit/c1bde0a2cb640b3607e9568b9a57b292e1f82666.diff L

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/95290 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ThreadSafety] Check trylock function success and return types (PR #95290)

2024-06-24 Thread via cfe-commits
github-actions[bot] wrote: @dmcardle Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a build

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-24 Thread Matt Arsenault via cfe-commits
@@ -2626,14 +2629,20 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { SmallVector OutputConstraintInfos; SmallVector InputConstraintInfos; + const FunctionDecl *FD = dyn_cast_or_null(CurCodeDecl); arsenm wrote: I think we should just get rid of d

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-24 Thread via cfe-commits
@@ -2626,14 +2629,20 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { SmallVector OutputConstraintInfos; SmallVector InputConstraintInfos; + const FunctionDecl *FD = dyn_cast_or_null(CurCodeDecl); Sirraide wrote: Yeah, I agree it seems weird to k

[clang] [clang] Improve diagnostics for constraints of inline asm (NFC) (PR #96363)

2024-06-24 Thread via cfe-commits
@@ -2626,14 +2629,20 @@ void CodeGenFunction::EmitAsmStmt(const AsmStmt &S) { SmallVector OutputConstraintInfos; SmallVector InputConstraintInfos; + const FunctionDecl *FD = dyn_cast_or_null(CurCodeDecl); Sirraide wrote: > do we want an RFC to decide on

[clang] 3ff680a - [C11] Claim we do not conform to WG14 N1285 yet

2024-06-24 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-24T09:50:37-04:00 New Revision: 3ff680a1a57d74a5c94d3da35594a8046a879888 URL: https://github.com/llvm/llvm-project/commit/3ff680a1a57d74a5c94d3da35594a8046a879888 DIFF: https://github.com/llvm/llvm-project/commit/3ff680a1a57d74a5c94d3da35594a8046a879888.diff

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm edited https://github.com/llvm/llvm-project/pull/95805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -161,6 +162,39 @@ static int PrintSupportedExtensions(std::string TargetStr) { return 0; } +static int PrintEnabledExtensions(const TargetOptions& TargetOpts) { + std::string Error; + const llvm::Target *TheTarget = + llvm::TargetRegistry::lookupTarget(TargetOpts.

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -14,23 +14,36 @@ class Extension< string TargetFeatureName,// String used for -target-feature and -march, unless overridden. string Spelling, // The XYZ in HasXYZ and AEK_XYZ. + string ArchitectureFeatureName, // The extension's "FE

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -1841,7 +1868,8 @@ INSTANTIATE_TEST_SUITE_P( AArch64::AEK_PROFILE, AArch64::AEK_RAND, AArch64::AEK_FP16FML, AArch64::AEK_I8MM, AArch64::AEK_JSCVT, AArch64::AEK_FCMA, - AArch64::AEK_PAUTH, AArch64::AEK_PER

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
https://github.com/tmatheson-arm commented: LGTM, just some minor suggestions/clarifications. https://github.com/llvm/llvm-project/pull/95805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -154,17 +156,39 @@ std::optional AArch64::parseCpu(StringRef Name) { return {}; } -void AArch64::PrintSupportedExtensions(StringMap DescMap) { +void AArch64::PrintSupportedExtensions() { outs() << "All available -march extensions for AArch64\n\n" << "" <

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -116,12 +116,18 @@ using ExtensionBitset = Bitset; // SubtargetFeature which may represent either an actual extension or some // internal LLVM property. struct ExtensionInfo { - StringRef Name; // Human readable name, e.g. "profile". + StringRef UserVisible

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -161,6 +162,39 @@ static int PrintSupportedExtensions(std::string TargetStr) { return 0; } +static int PrintEnabledExtensions(const TargetOptions& TargetOpts) { + std::string Error; + const llvm::Target *TheTarget = + llvm::TargetRegistry::lookupTarget(TargetOpts.

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -14,23 +14,36 @@ class Extension< tmatheson-arm wrote: The comment needs updating, something like: > A SubtargetFeature that represents one or more Architecture Extensions, as > defined in the Arm ARM and typically named `FEAT_*`. Each has an `AEK_*` > entr

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -19,3 +19,17 @@ // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1-a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s // ARM

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -19,3 +19,17 @@ // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s // RUN: %clang --target=arm64 -mlittle-endian -march=armv8.1-a -### -c %s 2>&1 | FileCheck -check-prefix=ARM64-GENERICV81A %s // ARM

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -154,17 +156,39 @@ std::optional AArch64::parseCpu(StringRef Name) { return {}; } -void AArch64::PrintSupportedExtensions(StringMap DescMap) { +void AArch64::PrintSupportedExtensions() { outs() << "All available -march extensions for AArch64\n\n" << "" <

[clang] [MS ABI]: Support preserve_none in MS ABI (PR #96487)

2024-06-24 Thread via cfe-commits
https://github.com/antangelo created https://github.com/llvm/llvm-project/pull/96487 Fixes ICE when compiling preserve_nonecc functions on Windows and adds support for the calling convention on AArch64 for Windows targets. >From 1e95098e324860268d55e72a14090f9524c7dde1 Mon Sep 17 00:00:00 2001

[clang] [MS ABI]: Support preserve_none in MS ABI (PR #96487)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: None (antangelo) Changes Fixes ICE when compiling preserve_nonecc functions on Windows and adds support for the calling convention on AArch64 for Windows targets. --- Full diff: https://github.com/llvm/llvm-project/pull/96487.di

[clang] [MS ABI]: Support preserve_none in MS ABI (PR #96487)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (antangelo) Changes Fixes ICE when compiling preserve_nonecc functions on Windows and adds support for the calling convention on AArch64 for Windows targets. --- Full diff: https://github.com/llvm/llvm-project/pull/96487.diff 4 Fil

[clang] [clang][CGRecordLayout] Remove dependency on isZeroSize (PR #96422)

2024-06-24 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/96422 >From f5938919b3a0060db6b373bead1c52f4bb65c841 Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Fri, 21 Jun 2024 12:15:07 +0100 Subject: [PATCH 1/4] [clang][CGRecordLayout] Remove dependency on isZeroSize Th

[clang-tools-extra] [clang-tidy] add fixhint for misc-use-internal-linkage (PR #96203)

2024-06-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96203 >From 669205c0f659239c58a3bde3ddadabb0a8ecbad8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 20 Jun 2024 15:05:57 + Subject: [PATCH 1/2] [clang-tidy] add fixhint for misc-use-internal-linkage --

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Tomas Matheson via cfe-commits
@@ -1130,7 +1130,8 @@ INSTANTIATE_TEST_SUITE_P( AArch64::AEK_MTE, AArch64::AEK_SSBS, AArch64::AEK_FP16,AArch64::AEK_FP16FML, AArch64::AEK_SB, AArch64::AEK_JSCVT, - AArch64::AEK_FCMA,

[clang-tools-extra] [clang-tidy] align all help message in run-clang-tidy (PR #96199)

2024-06-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96199 >From 03bc40a343227cb839ec908492c0d904be9af654 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 20 Jun 2024 14:36:51 + Subject: [PATCH 1/3] [clang-tidy] align all help message in run-clang-tidy [NF

[clang] [clang-format] Don't count template template parameter as declaration (PR #96396)

2024-06-24 Thread via cfe-commits
https://github.com/mydeveloperday commented: Doesn't this show a change in default formatting from ```c++ template class QQQ> class PPP> void comment_to_html_conversion_22() ``` ```c++ template class QQQ> class PPP> void comment_to_html_conversion_22() ``` I think the fact that the

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-06-24 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > Is this something that specifically requires its own flag? Or could we just > do `-Xarch_device -fprofile-generate`. Right now the `-fprofile-generate-gpu` and `-fprofile-instr-generate-gpu` flags make sure that the compiler-rt profiling library is included even if

[clang] [clang] Emit bad shift warnings (PR #70307)

2024-06-24 Thread Budimir Aranđelović via cfe-commits
https://github.com/budimirarandjelovicsyrmia updated https://github.com/llvm/llvm-project/pull/70307 From a80047859d20f0fbb591f6c8a561468ce966f845 Mon Sep 17 00:00:00 2001 From: budimirarandjelovicsyrmia Date: Thu, 26 Oct 2023 10:39:52 +0200 Subject: [PATCH] [clang] Emit bad shift warnings ---

[clang] ae1c564 - [clang][Interp] Cast dummy pointers to other pointer type if necessary

2024-06-24 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-24T16:17:03+02:00 New Revision: ae1c564d1522f1202d05b698dce8d9c8ca46667c URL: https://github.com/llvm/llvm-project/commit/ae1c564d1522f1202d05b698dce8d9c8ca46667c DIFF: https://github.com/llvm/llvm-project/commit/ae1c564d1522f1202d05b698dce8d9c8ca46667c.diff LO

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-06-24 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > I’m probably just stating the obvious here, but seeing as existing code > obviously does not make use of effects, for compiling it to become slower, > that means that we’re probably unconditionally executing code somewhere > irrespective of whether effects are present or not

[clang] 29e0f04 - [C11] Remove WG14 N1353 from the list of papers to track

2024-06-24 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-24T10:29:15-04:00 New Revision: 29e0f046735010540fbdba4371dcd26f9e437650 URL: https://github.com/llvm/llvm-project/commit/29e0f046735010540fbdba4371dcd26f9e437650 DIFF: https://github.com/llvm/llvm-project/commit/29e0f046735010540fbdba4371dcd26f9e437650.diff

[clang] 6ecb9fd - [C11] Remove WG14 N1382 from the list of papers to track

2024-06-24 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-24T10:34:11-04:00 New Revision: 6ecb9fd83d6015b19be8db554328645ae15e63e9 URL: https://github.com/llvm/llvm-project/commit/6ecb9fd83d6015b19be8db554328645ae15e63e9 DIFF: https://github.com/llvm/llvm-project/commit/6ecb9fd83d6015b19be8db554328645ae15e63e9.diff

[clang] fc4b09d - [analyzer] Add an ownership change visitor to StreamChecker (#94957)

2024-06-24 Thread via cfe-commits
Author: Kristóf Umann Date: 2024-06-24T16:34:36+02:00 New Revision: fc4b09d16139348533f1a1c9c72c99dacba51417 URL: https://github.com/llvm/llvm-project/commit/fc4b09d16139348533f1a1c9c72c99dacba51417 DIFF: https://github.com/llvm/llvm-project/commit/fc4b09d16139348533f1a1c9c72c99dacba51417.diff

[clang] [analyzer] Add an ownership change visitor to StreamChecker (PR #94957)

2024-06-24 Thread Kristóf Umann via cfe-commits
https://github.com/Szelethus closed https://github.com/llvm/llvm-project/pull/94957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b644726 - [PPC][InlineASM] Don't write to source directory in test

2024-06-24 Thread Benjamin Kramer via cfe-commits
Author: Benjamin Kramer Date: 2024-06-24T16:35:07+02:00 New Revision: b6447260748086c0df484ec6609f126ae90e91ea URL: https://github.com/llvm/llvm-project/commit/b6447260748086c0df484ec6609f126ae90e91ea DIFF: https://github.com/llvm/llvm-project/commit/b6447260748086c0df484ec6609f126ae90e91ea.dif

[clang] [Clang][objectsize] Generate object size calculation for sub-objects (PR #86858)

2024-06-24 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/86858 >From 31af119d614ef2108b5404f9c9387ec45aa1bfef Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Thu, 21 Mar 2024 15:07:31 -0700 Subject: [PATCH 1/7] [Clang][objectsize] Generate object size calculation for s

[clang] [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (PR #96494)

2024-06-24 Thread Dan McArdle via cfe-commits
https://github.com/dmcardle created https://github.com/llvm/llvm-project/pull/96494 Without a newline, documentation was failing to build with this error: Warning, treated as error: /home/runner/work/llvm-project/llvm-project/clang-build/tools/clang/docs/ThreadSafetyAnalysis.rst:466:Er

[clang] [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (PR #96494)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dan McArdle (dmcardle) Changes Without a newline, documentation was failing to build with this error: Warning, treated as error: /home/runner/work/llvm-project/llvm-project/clang-build/tools/clang/docs/ThreadSafetyAnalysis.rst:466

[clang] [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (PR #96494)

2024-06-24 Thread Dan McArdle via cfe-commits
dmcardle wrote: @AaronBallman PTAL — looks like #95290 broke the documentation. https://github.com/llvm/llvm-project/pull/96494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] add fixhint for misc-use-internal-linkage (PR #96203)

2024-06-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/96203 >From 669205c0f659239c58a3bde3ddadabb0a8ecbad8 Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Thu, 20 Jun 2024 15:05:57 + Subject: [PATCH 1/3] [clang-tidy] add fixhint for misc-use-internal-linkage --

[clang] [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (PR #96494)

2024-06-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thanks for the quick fix! https://github.com/llvm/llvm-project/pull/96494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] 3402620 - [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (#96494)

2024-06-24 Thread via cfe-commits
Author: Dan McArdle Date: 2024-06-24T10:48:51-04:00 New Revision: 34026207c87116bd8e7fb0a464ea8db947f8239a URL: https://github.com/llvm/llvm-project/commit/34026207c87116bd8e7fb0a464ea8db947f8239a DIFF: https://github.com/llvm/llvm-project/commit/34026207c87116bd8e7fb0a464ea8db947f8239a.diff L

[clang] [clang][ThreadSafety] Fix code block syntax in ThreadSafetyAnalysis.rst (PR #96494)

2024-06-24 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman closed https://github.com/llvm/llvm-project/pull/96494 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Lucas Duarte Prates via cfe-commits
@@ -161,6 +162,39 @@ static int PrintSupportedExtensions(std::string TargetStr) { return 0; } +static int PrintEnabledExtensions(const TargetOptions& TargetOpts) { + std::string Error; + const llvm::Target *TheTarget = + llvm::TargetRegistry::lookupTarget(TargetOpts.

[clang] [Clang][SveEmitter] Split up TargetGuard into SVE and SME component. (PR #96482)

2024-06-24 Thread Paul Walker via cfe-commits
https://github.com/paulwalker-arm approved this pull request. This is certainly a step in the right direction. https://github.com/llvm/llvm-project/pull/96482 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/96497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-powerpc Author: Stephen Tozer (SLTozer) Changes Uses the new InsertPosition class (added in #94226) to simplify some of the IRBuilder interface, and removes the need to pass a BasicBlock alongside a BasicBlock::iterator, using the fact that we

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Stephen Tozer (SLTozer) Changes Uses the new InsertPosition class (added in #94226) to simplify some of the IRBuilder interface, and removes the need to pass a BasicBlock alongside a BasicBlock::iterator, using the fact that we c

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-backend-webassembly @llvm/pr-subscribers-clang-codegen Author: Stephen Tozer (SLTozer) Changes Uses the new InsertPosition class (added in #94226) to simplify some of the IRBuilder interface, and removes the need to pass a Basi

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-arm Author: Stephen Tozer (SLTozer) Changes Uses the new InsertPosition class (added in #94226) to simplify some of the IRBuilder interface, and removes the need to pass a BasicBlock alongside a BasicBlock::iterator, using the fact that we can

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Stephen Tozer (SLTozer) Changes Uses the new InsertPosition class (added in #94226) to simplify some of the IRBuilder interface, and removes the need to pass a BasicBlock alongside a BasicBlock::iterator, using the fact that we

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir Author: Stephen Tozer (SLTozer) Changes Uses the new InsertPosition class (added in #94226) to simplify some of the IRBuilder interface, and removes the need to pass a BasicBlock alongside a BasicBlock::iterator, using the fact that we can now get

[clang] b012ab0 - [C23] Claim conformance to WG14 N3033

2024-06-24 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-24T10:52:17-04:00 New Revision: b012ab01cb39e440a38dad5d7dd71b419480264b URL: https://github.com/llvm/llvm-project/commit/b012ab01cb39e440a38dad5d7dd71b419480264b DIFF: https://github.com/llvm/llvm-project/commit/b012ab01cb39e440a38dad5d7dd71b419480264b.diff

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-06-24 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I really like the idea of documenting this, hopefully this create some fruitful discussions with the build system developers and other compiler users. After trying to put myself into the shoes of the compiler users reading this, I can't help but think that the "no transiti

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Lucas Duarte Prates via cfe-commits
@@ -161,6 +162,39 @@ static int PrintSupportedExtensions(std::string TargetStr) { return 0; } +static int PrintEnabledExtensions(const TargetOptions& TargetOpts) { + std::string Error; + const llvm::Target *TheTarget = + llvm::TargetRegistry::lookupTarget(TargetOpts.

[clang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-24 Thread Jon Roelofs via cfe-commits
@@ -1130,7 +1130,8 @@ INSTANTIATE_TEST_SUITE_P( AArch64::AEK_MTE, AArch64::AEK_SSBS, AArch64::AEK_FP16,AArch64::AEK_FP16FML, AArch64::AEK_SB, AArch64::AEK_JSCVT, - AArch64::AEK_FCMA,

[clang] [clang][analyzer] Improve PointerSubChecker (PR #96501)

2024-06-24 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/96501 The checker could report false positives if pointer arithmetic was done on pointers to non-array data before pointer subtraction. Another problem is fixed that could cause false positive if members of the same

[libunwind] [llvm] [runtimes] remove workaround for old CMake when setting `--unwindlib=none` (PR #93429)

2024-06-24 Thread antoine moynault via cfe-commits
antmox wrote: I may be missing something, but it looks like the armv7m-picolibc-no-exceptions issue is still related to https://gitlab.kitware.com/cmake/cmake/-/issues/23454 I notice that once the `--unwindlib=none` flag is added to `CMAKE_REQUIRED_LINK_OPTIONS`, it is also added to ar command

[clang] [clang][analyzer] Improve PointerSubChecker (PR #96501)

2024-06-24 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balázs Kéri (balazske) Changes The checker could report false positives if pointer arithmetic was done on pointers to non-array data before pointer subtraction. Another problem is fixed that co

[clang] [Serialization] Don't read all declaration id eagerly when merge the tables (PR #95506)

2024-06-24 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: I feel the increased complexity does not seem like a good trade-off if it does not significantly improve performance. However I don't feel too strongly about it, so I suggest you get a second opinion if you feel strongly that we should land this. https://github.com/llvm/ll

[clang] [Serialization] Storing DeclID separately (PR #95897)

2024-06-24 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: Sorry for not getting to it today, I'll send a review tomorrow. https://github.com/llvm/llvm-project/pull/95897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Extend lifetime bound analysis to support assignments (PR #96475)

2024-06-24 Thread Ilya Biryukov via cfe-commits
ilya-biryukov wrote: @hokein could you please split this into two PRs, one with an NFC change and another one with adding assignment support? GitHub is not great at providing the UI to review individual commits and we won't be able to merge as 2 separate commits with the green button (which see

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/96497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread Nikita Popov via cfe-commits
@@ -44,15 +44,19 @@ template <> struct ilist_alloc_traits { iterator_range::iterator> getDbgRecordRange(DbgMarker *); +/// Class used to generate an insert position (ultimately always a +/// BasicBlock::iterator, which it will implicitly convert to) from either: +/// - An Inst

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread Nikita Popov via cfe-commits
@@ -3136,7 +3136,7 @@ static void LLVMPositionBuilderImpl(IRBuilder<> *Builder, BasicBlock *Block, Instruction *Instr, bool BeforeDbgRecords) { BasicBlock::iterator I = Instr ? Instr->getIterator() : Block->end(); I.setHeadBit(BeforeDbg

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM if CI is happy. https://github.com/llvm/llvm-project/pull/96497 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [polly] [IR][NFC] Update IRBuilder to use InsertPosition (PR #96497)

2024-06-24 Thread Nikita Popov via cfe-commits
@@ -637,8 +637,7 @@ void ARMParallelDSP::InsertParallelMACs(Reduction &R) { Intrinsic::getDeclaration(M, Intrinsic::arm_smlad) : Intrinsic::getDeclaration(M, Intrinsic::arm_smlald); -IRBuilder Builder(InsertAfter->getParent(), -

[clang] [llvm] [RISCV] Remove experimental from Ztso. (PR #96465)

2024-06-24 Thread Craig Topper via cfe-commits
topperc wrote: I think @preames told me he was keeping this experimental for a reason. https://github.com/llvm/llvm-project/pull/96465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove preprocessor guards and global feature checks for NEON (PR #95224)

2024-06-24 Thread Maciej Gabka via cfe-commits
https://github.com/mgabka approved this pull request. https://github.com/llvm/llvm-project/pull/95224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3e36dfa - [C23] Remove WG14 N2660 from the list of papers we track

2024-06-24 Thread Aaron Ballman via cfe-commits
Author: Aaron Ballman Date: 2024-06-24T11:12:18-04:00 New Revision: 3e36dfafa0d11b2a5d7776d88f170c449116aa0e URL: https://github.com/llvm/llvm-project/commit/3e36dfafa0d11b2a5d7776d88f170c449116aa0e DIFF: https://github.com/llvm/llvm-project/commit/3e36dfafa0d11b2a5d7776d88f170c449116aa0e.diff

[clang-tools-extra] [clang-tidy] Fix assert in performance-unnecessary-copy-init. (PR #96506)

2024-06-24 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle created https://github.com/llvm/llvm-project/pull/96506 `GetDirectCallee` can be null. Fixes #96498. >From 5034dc92f9098874471b3f035fceb8275629b37a Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 24 Jun 2024 15:05:48 + Subject: [PATCH] [clang-tidy

<    1   2   3   4   5   6   >