[clang] [llvm] [InstCombine] Infer disjoint flag on Or instructions. (PR #72912)

2023-12-04 Thread Craig Topper via cfe-commits
topperc wrote: > Here's a simple-ish example: > > ```llvm > ; Transforms/InstCombine/add.ll > > define i5 @zext_sext_not(i4 %x) { > %zx = zext i4 %x to i5 > %notx = xor i4 %x, 15 > %snotx = sext i4 %notx to i5 > %r = add i5 %zx, %snotx > ret i5 %r > } > => > define i5 @zext_sext_not(i

[clang] [clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. (PR #68618)

2023-12-04 Thread Yonggang Luo via cfe-commits
https://github.com/lygstate updated https://github.com/llvm/llvm-project/pull/68618 >From d1886bab8356262b1305093465658acffb4cafff Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Tue, 10 Oct 2023 02:23:34 +0800 Subject: [PATCH] [clang] Fixes compile error that double colon operator cannot re

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-04 Thread Mingming Liu via cfe-commits
https://github.com/minglotus-6 updated https://github.com/llvm/llvm-project/pull/74008 >From 4cb5b087485124a7f2375fdc018b42a0401e6409 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Thu, 30 Nov 2023 15:41:37 -0800 Subject: [PATCH 1/3] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier,

[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-04 Thread Mingming Liu via cfe-commits
@@ -246,11 +246,27 @@ std::string InstrProfError::message() const { char InstrProfError::ID = 0; -std::string getPGOFuncName(StringRef RawFuncName, - GlobalValue::LinkageTypes Linkage, +std::string getPGOFuncName(StringRef Name, GlobalValue::LinkageT

[llvm] [libcxx] [compiler-rt] [flang] [clang] [libc] [clang-tools-extra] [NFC][ASAN] Replace AsanInitIsRunning with TryAsanInitFromRtl (PR #74171)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/74171 >From c630b3d042729fa2053866c959e8e05b8ce11267 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 1 Dec 2023 19:20:23 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?UT

[clang] b6d0ee0 - Revert HWASAN failure (#74163)

2023-12-04 Thread Kirill Stoimenov via cfe-commits
Author: Kirill Stoimenov Date: 2023-12-02T04:39:14Z New Revision: b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b URL: https://github.com/llvm/llvm-project/commit/b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b DIFF: https://github.com/llvm/llvm-project/commit/b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b.diff L

[clang] b6d0ee0 - Revert HWASAN failure (#74163)

2023-12-04 Thread Kirill Stoimenov via cfe-commits
Author: Kirill Stoimenov Date: 2023-12-02T04:39:14Z New Revision: b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b URL: https://github.com/llvm/llvm-project/commit/b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b DIFF: https://github.com/llvm/llvm-project/commit/b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b.diff L

[clang] b6d0ee0 - Revert HWASAN failure (#74163)

2023-12-04 Thread Kirill Stoimenov via cfe-commits
Author: Kirill Stoimenov Date: 2023-12-02T04:39:14Z New Revision: b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b URL: https://github.com/llvm/llvm-project/commit/b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b DIFF: https://github.com/llvm/llvm-project/commit/b6d0ee056d247e1ecfd4ecd3f97fb2d31740d79b.diff L

[clang] [llvm] [InstCombine] Infer disjoint flag on Or instructions. (PR #72912)

2023-12-04 Thread Craig Topper via cfe-commits
topperc wrote: @nikic is something like this the right fix ``` diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 8c29c242215d..b03a56c922de 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -235,8 +235,11 @@

[clang] [llvm] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

2023-12-04 Thread Mingming Liu via cfe-commits
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO, GlobalValue::LinkageTypes Linkage, StringRef FileName) { SmallString<64> Name; - if (llvm::GlobalValue::isLocalLinkage(Linkage)) { -Name.appen

[clang] [libc] [flang] [llvm] [compiler-rt] [clang-tools-extra] [libcxx] [NFC][ASAN] Replace AsanInitIsRunning with TryAsanInitFromRtl (PR #74171)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/74171 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [InstCombine] Infer disjoint flag on Or instructions. (PR #72912)

2023-12-04 Thread Nuno Lopes via cfe-commits
nunoplopes wrote: We don't have a `isGuaranteedNotToBeUndef` only function, so that's the only way. I would leave a fixme, since this call can be removed if we ever manage to kill undef. Thanks for your help! 🙂 https://github.com/llvm/llvm-project/pull/72912 ___

[clang] [clang-tools-extra] [llvm] [AArch64][Clang] Fix linker error for function multiversioning (PR #74358)

2023-12-04 Thread via cfe-commits
https://github.com/DanielKristofKiss created https://github.com/llvm/llvm-project/pull/74358 AArch64 part of https://github.com/llvm/llvm-project/pull/71706. Default version is now mangled with .default. Resolver for the TargetVersion need to be emitted from the CodeGenModule::EmitMultiVersionF

[libc] [flang] [clang-tools-extra] [llvm] [compiler-rt] [libcxx] [clang] [NFC][asan] Replace AsanInited/ENSURE_ASAN_INITED with TryAsanInitFromRtl (PR #74172)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/74172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [AArch64][Clang] Fix linker error for function multiversioning (PR #74358)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Dani (DanielKristofKiss) Changes AArch64 part of https://github.com/llvm/llvm-project/pull/71706. Default version is now mangled with .default. Resolver for the TargetVersion need to be emitted from the CodeGenModule::EmitMultiVe

[clang] [libc] [flang] [llvm] [compiler-rt] [clang-tools-extra] [libcxx] [NFC][asan] Replace AsanInited/ENSURE_ASAN_INITED with TryAsanInitFromRtl (PR #74172)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/74172 >From 0d25d8cfc9de89a538a7ae3ae97ddc8a664a70d5 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 1 Dec 2023 19:20:28 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?UT

[llvm] [clang] [InstCombine] Infer disjoint flag on Or instructions. (PR #72912)

2023-12-04 Thread Nikita Popov via cfe-commits
nikic wrote: > We don't have a `isGuaranteedNotToBeUndef` only function, so that's the only > way. I would leave a fixme, since this call can be removed if we ever manage > to kill undef. I actually added this function earlier today. > @nikic is something like this the right fix? I'd move th

[clang] [clang-tools-extra] [llvm] [AArch64][Clang] Fix linker error for function multiversioning (PR #74358)

2023-12-04 Thread Jon Roelofs via cfe-commits
@@ -4178,8 +4184,22 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) { ResolverCon

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-04 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: I want just note that it is probably not an improvement from the user's point of view, just a change of wording. https://github.com/llvm/llvm-project/pull/71077 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [clang-format] Fix a bug in `git-clang-format --binary` (PR #74293)

2023-12-04 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/74293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang][tidy] Ensure rewriter has the correct CWD (PR #67839)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -227,6 +227,14 @@ class ErrorReporter { llvm::errs() << "Can't apply replacements for file " << File << "\n"; } } + + auto BuildDir = Context.getCurrentBuildDirectory(); PiotrZSL wrote: I think you may need to do what is done in

[clang] [clang] Fixes compile error that double colon operator cannot resolve macro with parentheses. (PR #68618)

2023-12-04 Thread Yonggang Luo via cfe-commits
lygstate wrote: ping for merge https://github.com/llvm/llvm-project/pull/68618 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/68157 >From e3a96bef47d029e1109dcad51840bab672c7351c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Tue, 3 Oct 2023 13:40:07 -0700 Subject: [PATCH 1/2] [clang] NFC: Deprecate `FileEntry::getName()` --- clang/i

[clang] [CUDA][Win32] Add `fma(long double,..)` to math forward declares. (PR #73756)

2023-12-04 Thread Evgeny Mankov via cfe-commits
@@ -70,6 +70,9 @@ __DEVICE__ double floor(double); __DEVICE__ float floor(float); __DEVICE__ double fma(double, double, double); __DEVICE__ float fma(float, float, float); +#ifdef _MSC_VER +__DEVICE__ long double fma(long double, long double, long double); eman

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/66583 ___ 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 modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM, this should be merged so other llvm users could test it. As check is complicated I expect that there can be some false-positives or issues reported when llvm 18 would release. https://github.com/llvm/llvm-project/pull/66583 _

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Piotr Zegar via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers +fix

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-12-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. I wish we could clean up `checkLocation` to work as expected for all cases. It is more future proof in the sense that if C++ introduces new kinds of statements or expressions that could index into something (like multi-dimensional `opera

[clang] [analyzer] Switch to PostStmt callbacks in ArrayBoundV2 (PR #72107)

2023-12-04 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/72107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/74365 `-arch` is a Darwin-specific option that is ignored for other targets and not known by GCC. ``` % clang -arch arm64 -c a.c clang: warning: argument unused during compilation: '-arch arm64' [-Wunused-command-line-

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes `-arch` is a Darwin-specific option that is ignored for other targets and not known by GCC. ``` % clang -arch arm64 -c a.c clang: warning: argument unused during compilation:

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Enhance handling of Apple-specific '-arch'/'-target' option values (PR #72821)

2023-12-04 Thread Fangrui Song via cfe-commits
MaskRay wrote: `-arch ` is also related to universal binary that many other targets don't support (and they likely don't endorse such an approach). For ELF we should definitely encourage `--target=` for cross compilation. (`-target ` has been deprecated since Clang 3.2). Picking a default vers

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Julian Schmidt via cfe-commits
@@ -0,0 +1,58 @@ +.. title:: clang-tidy - modernize-use-std-numbers + +modernize-use-std-numbers += + +Finds constants and function calls to math functions that can be replaced +with c++20's mathematical constants from the ``numbers`` header and offers +fix

[clang-tools-extra] [clang-tidy] add modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Julian Schmidt via cfe-commits
5chmidti wrote: Force push to resolve conflicts https://github.com/llvm/llvm-project/pull/66583 ___ 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 modernize-use-std-numbers (PR #66583)

2023-12-04 Thread Julian Schmidt via cfe-commits
5chmidti wrote: I fetched from the wrong remote. Conflicts are resolved. The options docs were added in 284fa1b94ef72c29f13a2ec50ca76b429c842b0c https://github.com/llvm/llvm-project/pull/66583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [clang] Enhance handling of Apple-specific '-arch'/'-target' option values (PR #72821)

2023-12-04 Thread James Y Knight via cfe-commits
jyknight wrote: I don't think this is a good idea. Not only is that weird to magically switch to an apple build from a non-apple platform, this is also not even a particularly useful behavior for an Apple platform, where "darwin" is basically deprecated, and you're supposed to use a target of

[clang] [clang] Improve bit-field in ref NTTP diagnostic (PR #71077)

2023-12-04 Thread Andrey Ali Khan Bolshakov via cfe-commits
https://github.com/bolshakov-a updated https://github.com/llvm/llvm-project/pull/71077 >From e5ad8f5b00a297ef745e1b9341df32b80a7c6b77 Mon Sep 17 00:00:00 2001 From: Bolshakov Date: Thu, 2 Nov 2023 19:20:27 +0300 Subject: [PATCH] [clang] Improve bit-field in ref NTTP diagnostic Prior to this, a

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread James Y Knight via cfe-commits
https://github.com/jyknight approved this pull request. https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka updated https://github.com/llvm/llvm-project/pull/74006 >From a6ea5e2da353ba006083082976065c9a8a988cbc Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Mon, 6 Nov 2023 14:22:02 -0800 Subject: [PATCH 1/2] [clang][modules] Reset codegen options. CodeGen options d

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Juergen Ributzka via cfe-commits
@@ -515,6 +430,8 @@ ENUM_CODEGENOPT(ZeroCallUsedRegs, llvm::ZeroCallUsedRegs::ZeroCallUsedRegsKind, /// non-deleting destructors. (No effect on Microsoft ABI.) CODEGENOPT(CtorDtorReturnThis, 1, 0) +#include "DebugOptions.def" ributzka wrote: I added the FIXM

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Juergen Ributzka via cfe-commits
@@ -4770,9 +4770,20 @@ std::string CompilerInvocation::getModuleHash() const { // When compiling with -gmodules, also hash -fdebug-prefix-map as it // affects the debug info in the PCM. - if (getCodeGenOpts().DebugTypeExtRefs) + if (getHeaderSearchOpts().ModuleFormat ==

[clang] e77bfaa - [clang][NFC] Fill in historical data on when C++ DRs 500-599 were fixed

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
Author: Vlad Serebrennikov Date: 2023-12-05T00:42:13+03:00 New Revision: e77bfaaf9d66748fc2dc3a710a0c9b4665dd3034 URL: https://github.com/llvm/llvm-project/commit/e77bfaaf9d66748fc2dc3a710a0c9b4665dd3034 DIFF: https://github.com/llvm/llvm-project/commit/e77bfaaf9d66748fc2dc3a710a0c9b4665dd3034.

[clang] [clang][NFC] Refactor expected directives in C++ DRs 500-599 (PR #74373)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll created https://github.com/llvm/llvm-project/pull/74373 This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. >From 1e5ede1925b8cfdae93415abfddb930aaaf3241e Mon Sep 17 00:00:00 2001

[clang] [clang][NFC] Refactor expected directives in C++ DRs 500-599 (PR #74373)

2023-12-04 Thread Vlad Serebrennikov via cfe-commits
Endilll wrote: This PR is created to check the patch against CI. https://github.com/llvm/llvm-project/pull/74373 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor expected directives in C++ DRs 500-599 (PR #74373)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Vlad Serebrennikov (Endilll) Changes This patch continues the work started with ea5b1ef016d020c37f903d6c7d4f623be975dab8. See that commit and its corresponding PR for details. --- Patch is 47.59 KiB, truncated to 20.00 KiB below, full v

[clang] 78940a4 - [clang-format] Fix a bug in `git-clang-format --binary` (#74293)

2023-12-04 Thread via cfe-commits
Author: Owen Pan Date: 2023-12-04T13:49:23-08:00 New Revision: 78940a4e1f7f484d8a2dd0c646e288d6a5bf2f81 URL: https://github.com/llvm/llvm-project/commit/78940a4e1f7f484d8a2dd0c646e288d6a5bf2f81 DIFF: https://github.com/llvm/llvm-project/commit/78940a4e1f7f484d8a2dd0c646e288d6a5bf2f81.diff LOG:

[clang] [clang-format] Fix a bug in `git-clang-format --binary` (PR #74293)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. LGTM, nice! https://github.com/llvm/llvm-project/pull/74006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Juergen Ributzka via cfe-commits
ributzka wrote: Thanks for the reviews https://github.com/llvm/llvm-project/pull/74006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka updated https://github.com/llvm/llvm-project/pull/74006 >From 416c233bf334fd96ec6e5b54971f3ae5c6b99843 Mon Sep 17 00:00:00 2001 From: Juergen Ributzka Date: Mon, 6 Nov 2023 14:22:02 -0800 Subject: [PATCH] [clang][modules] Reset codegen options. CodeGen options do no

[clang] [libclang/python] Fix some minor typos (PR #74292)

2023-12-04 Thread Craig Hesling via cfe-commits
https://github.com/linux4life798 edited https://github.com/llvm/llvm-project/pull/74292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] fef1854 - [clang][modules] Reset codegen options. (#74006)

2023-12-04 Thread via cfe-commits
Author: Juergen Ributzka Date: 2023-12-04T13:54:57-08:00 New Revision: fef1854318bd797c1f8a141d4b45b113b04860d1 URL: https://github.com/llvm/llvm-project/commit/fef1854318bd797c1f8a141d4b45b113b04860d1 DIFF: https://github.com/llvm/llvm-project/commit/fef1854318bd797c1f8a141d4b45b113b04860d1.di

[clang] [clang][modules] Reset codegen options. (PR #74006)

2023-12-04 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka closed https://github.com/llvm/llvm-project/pull/74006 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang/python] Fix some minor typos (PR #74292)

2023-12-04 Thread Craig Hesling via cfe-commits
https://github.com/linux4life798 edited https://github.com/llvm/llvm-project/pull/74292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-04 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space created https://github.com/llvm/llvm-project/pull/74377 This patch renames `flang-new` as `flang`. Similarly to Clang, Flang's driver executable will be called: * `flang-` A symlink called `flang` pointing at `flang-` will be created at build time. This is con

[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Andrzej Warzyński (banach-space) Changes This patch renames `flang-new` as `flang`. Similarly to Clang, Flang's driver executable will be called: * `flang-` A symlink called `flang` point

[clang] [flang] [flang][driver] Rename `flang-new` as `flang` (PR #74377)

2023-12-04 Thread Thorsten Schütt via cfe-commits
tschuett wrote: Are you going to add an entry to the [Release Nodes](https://github.com/llvm/llvm-project/blob/main/flang/docs/ReleaseNotes.md)? https://github.com/llvm/llvm-project/pull/74377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[clang] [CUDA][Win32] Add `fma(long double,..)` to math forward declares. (PR #73756)

2023-12-04 Thread Artem Belevich via cfe-commits
@@ -70,6 +70,9 @@ __DEVICE__ double floor(double); __DEVICE__ float floor(float); __DEVICE__ double fma(double, double, double); __DEVICE__ float fma(float, float, float); +#ifdef _MSC_VER +__DEVICE__ long double fma(long double, long double, long double); Arte

[clang] 1157bee - Revert "[clang][modules] Reset codegen options. (#74006)"

2023-12-04 Thread Juergen Ributzka via cfe-commits
Author: Juergen Ributzka Date: 2023-12-04T14:28:22-08:00 New Revision: 1157bee5ce2c7acb803cda5003b2ea9d0ed962e2 URL: https://github.com/llvm/llvm-project/commit/1157bee5ce2c7acb803cda5003b2ea9d0ed962e2 DIFF: https://github.com/llvm/llvm-project/commit/1157bee5ce2c7acb803cda5003b2ea9d0ed962e2.di

[clang] [llvm] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-04 Thread Ben Barham via cfe-commits
bnbarham wrote: 🎉 thanks @jansvoboda11 for slogging through all these! https://github.com/llvm/llvm-project/pull/68157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 updated https://github.com/llvm/llvm-project/pull/74020 >From 00083bb1573561361ff0782f425ebec2a5218f34 Mon Sep 17 00:00:00 2001 From: ziqingluo-90 Date: Mon, 4 Dec 2023 14:37:10 -0800 Subject: [PATCH] Thread safety analysis: Fix a bug in handling temporary const

[llvm] [compiler-rt] [flang] [clang] [libcxx] [clang-tools-extra] [libc] [NFC][asan] Replace AsanInited/ENSURE_ASAN_INITED with TryAsanInitFromRtl (PR #74172)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/74172 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] [clang] [libcxx] [compiler-rt] [llvm] [flang] [NFC][asan] Replace a few `#if SANITIZER_APPLE` with `if (SANITIZER_APPLE` (PR #74173)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/74173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [compiler-rt] [flang] [clang] [libcxx] [clang-tools-extra] [libc] [NFC][asan] Replace a few `#if SANITIZER_APPLE` with `if (SANITIZER_APPLE` (PR #74173)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/74173 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] [clang] [libcxx] [compiler-rt] [llvm] [flang] [NFC][asan] Inline ENSURE_ASAN_INITED macro (PR #74174)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/74174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [lldb] [libc] [mlir] [clang] [libcxx] [polly] [compiler-rt] [lld] [llvm] [flang] [NFC][asan] Inline ENSURE_ASAN_INITED macro (PR #74174)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/74174 >From 71e54faa238765cb9df656a3f6e347a2d04f989a Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Fri, 1 Dec 2023 19:20:37 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?UT

[clang-tools-extra] [lldb] [libc] [mlir] [clang] [libcxx] [polly] [compiler-rt] [lld] [llvm] [flang] [NFC][asan] Inline ENSURE_ASAN_INITED macro (PR #74174)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/74174 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [compiler-rt] [flang] [clang] [libcxx] [lldb] [libc] [lld] [hwasan] Use ErrorAction::Recover in interceptors (PR #74000)

2023-12-04 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/74000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Ziqing Luo via cfe-commits
ziqingluo-90 wrote: @aaronpuchert Thanks for your comment! I have addressed them. Do you mind to take an another look and approve it if it looks good to you? https://github.com/llvm/llvm-project/pull/74020 ___ cfe-commits mailing list cfe-commits@l

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-04 Thread via cfe-commits
https://github.com/mydeveloperday approved this pull request. https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Mark -arch as TargetSpecific (PR #74365)

2023-12-04 Thread Brad Smith via cfe-commits
https://github.com/brad0 approved this pull request. https://github.com/llvm/llvm-project/pull/74365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [Clangd] Sanitize path before recording into IncludeStructure during buildPreamble (PR #70798)

2023-12-04 Thread via cfe-commits
https://github.com/Maddobun updated https://github.com/llvm/llvm-project/pull/70798 >From 0572afa42e4e6ca1d1de0e9df045828552cb4480 Mon Sep 17 00:00:00 2001 From: Leo Zhu Date: Wed, 8 Nov 2023 11:10:13 -0500 Subject: [PATCH 1/3] Convert URI to uppercase drive letter during parsing --- clang-to

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/3] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
https://github.com/pizzud updated https://github.com/llvm/llvm-project/pull/67467 >From 6d5d35e1273f595e8a0382053d5183cbce7a9d8a Mon Sep 17 00:00:00 2001 From: David Pizzuto Date: Tue, 26 Sep 2023 10:45:42 -0700 Subject: [PATCH 1/4] [clang-tidy] Add bugprone-move-shared-pointer-contents check.

[clang-tools-extra] [clang] [libc] [libcxx] [llvm] [compiler-rt] [openmp] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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: Apa

[compiler-rt] [clang-tools-extra] [libcxx] [libc] [llvm] [flang] [openmp] [clang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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: Apa

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,39 @@ +//===--- MoveSharedPointerContentsCheck.h - clang-tidy --*- 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: Apa

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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: Apa

[clang-tools-extra] [clang] [libc] [libcxx] [llvm] [compiler-rt] [openmp] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -25,6 +25,7 @@ add_clang_library(clangTidyBugproneModule ImplicitWideningOfMultiplicationResultCheck.cpp InaccurateEraseCheck.cpp IncorrectEnableIfCheck.cpp + MoveSharedPointerContentsCheck.cpp pizzud wrote: Done, bad merge. https://github.com/llvm/

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,51 @@ +//===--- MoveSharedPointerContentsCheck.cpp - clang-tidy --===// +// +// 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: Apa

[clang-tools-extra] [clang] [libc] [libcxx] [llvm] [compiler-rt] [openmp] [flang] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -118,6 +119,7 @@ Clang-Tidy Checks :doc:`bugprone-posix-return `, "Yes" :doc:`bugprone-redundant-branch-condition `, "Yes" :doc:`bugprone-reserved-identifier `, "Yes" + :doc:`bugprone-shared-pointer-contents-move `, "Yes" pizzud wrote: Done. h

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -107,6 +107,7 @@ Clang-Tidy Checks :doc:`bugprone-misplaced-pointer-arithmetic-in-alloc `, "Yes" :doc:`bugprone-misplaced-widening-cast `, :doc:`bugprone-move-forwarding-reference `, "Yes" + :doc:`bugprone-move-shared-pointer-contents `, "Yes"

[llvm] [libc] [clang-tools-extra] [compiler-rt] [flang] [clang] [libcxx] [openmp] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
@@ -0,0 +1,75 @@ +// RUN: %check_clang_tidy %s bugprone-move-shared-pointer-contents %t -- -config="{CheckOptions: {bugprone-move-shared-pointer-contents.SharedPointerClasses: 'std::shared_ptr;my::OtherSharedPtr;'}}" + +// Some dummy definitions we'll need. + +namespace std { +

[llvm] [compiler-rt] [flang] [openmp] [clang] [libcxx] [clang-tools-extra] [libc] [clang-tidy] Add bugprone-move-shared-pointer-contents check. (PR #67467)

2023-12-04 Thread via cfe-commits
pizzud wrote: Try searching for `unresolvedLookupExpr` & `UnresolvedLookupExpr` in the clang-tidy directory. There is a high probability that another check has done something related/similar. > > https://github.com/llvm/llvm-project/blob/2b7191c8993b5608ddb8b89c049717b497265796/clang-tools-ext

[llvm] [clang] [clang] NFC: Deprecate `FileEntry::getName()` (PR #68157)

2023-12-04 Thread Jan Svoboda via cfe-commits
@@ -284,7 +284,6 @@ TEST_F(FileManagerTest, getFileRefReturnsCorrectNameForDifferentStatPath) { ASSERT_FALSE(!F1Alias); ASSERT_FALSE(!F1Alias2); EXPECT_EQ("dir/f1.cpp", F1->getName()); - EXPECT_EQ("dir/f1.cpp", F1->getFileEntry().getName()); jansvoboda1

[clang] [clang][modules] Reset codegen options (take 2). (PR #74388)

2023-12-04 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka created https://github.com/llvm/llvm-project/pull/74388 CodeGen options do not affect the AST, so they usually can be ignored. The only exception to the rule is when a PCM is created with `-gmodules`. In that case the Clang module format is switched to object file con

[clang] [clang][modules] Reset codegen options (take 2). (PR #74388)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Juergen Ributzka (ributzka) Changes CodeGen options do not affect the AST, so they usually can be ignored. The only exception to the rule is when a PCM is created with `-gmodules`. In that case the Clang module format is switched to object

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Aaron Puchert via cfe-commits
@@ -1530,7 +1532,6 @@ void ThreadSafetyAnalyzer::getEdgeLockset(FactSet& Result, } namespace { - aaronpuchert wrote: Nitpick: can you undo the whitespace change? https://github.com/llvm/llvm-project/pull/74020 ___

[clang] Thread safety analysis: Fix a bug in handling temporary constructors (PR #74020)

2023-12-04 Thread Aaron Puchert via cfe-commits
@@ -2487,15 +2486,15 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { // Clean up constructed object even if there are no attributes to // keep the number of objects in limbo as small as possible. - if (auto Object = LocksetBui

[compiler-rt] [llvm] [clang] [libcxx] [mlir] [flang] [clang-tools-extra] [mlir] Fix a zero stride canonicalizer crash (PR #74200)

2023-12-04 Thread Kai Sasaki via cfe-commits
https://github.com/Lewuathe approved this pull request. Thanks for the update. It LGTM. https://github.com/llvm/llvm-project/pull/74200 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 924f6ca - [clang-format] Remove duplicates in @property using std::set (#74235)

2023-12-04 Thread via cfe-commits
Author: Owen Pan Date: 2023-12-04T16:33:20-08:00 New Revision: 924f6ca1bdc49efe776d7f5cfd43d421b65346ba URL: https://github.com/llvm/llvm-project/commit/924f6ca1bdc49efe776d7f5cfd43d421b65346ba DIFF: https://github.com/llvm/llvm-project/commit/924f6ca1bdc49efe776d7f5cfd43d421b65346ba.diff LOG:

[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/74235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
bcl5980 wrote: AMDGPU can not unorll this case: https://godbolt.org/z/4Pq3bnzTT But the same code in X86 looks can unroll: https://godbolt.org/z/zr8aTG1KW We may need to continue debug on it. https://github.com/llvm/llvm-project/pull/74268 ___ cfe-

[llvm] [clang] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
xiangzh1 wrote: > AMDGPU can not unorll this case: > > https://godbolt.org/z/4Pq3bnzTT > > But the same code in X86 looks can unroll: > > https://godbolt.org/z/zr8aTG1KW > > We may need to continue debug on it. X86 do very conservative unroll too,its upper bound send to 4 (default is 8), if

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/74399 This is a minor improvement to #73491. >From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 4 Dec 2023 17:33:47 -0800 Subject: [PATCH] [clang-format][NFC] Use `prog` i

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes This is a minor improvement to #73491. --- Full diff: https://github.com/llvm/llvm-project/pull/74399.diff 1 Files Affected: - (modified) clang/tools/clang-format/clang-format-diff.py (+1-2) `

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread via cfe-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r 192439db6e3fcccf98c850bda1b970a11c590bbb..ee039e7c50751fabdbaadae73a0a09bc905620f2 clang/

[clang] [clang-format][NFC] Use `prog` in clang-format-diff.py (PR #74399)

2023-12-04 Thread Owen Pan via cfe-commits
https://github.com/owenca updated https://github.com/llvm/llvm-project/pull/74399 >From ee039e7c50751fabdbaadae73a0a09bc905620f2 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 4 Dec 2023 17:33:47 -0800 Subject: [PATCH 1/2] [clang-format][NFC] Use `prog` in clang-format-diff.py This is a mi

[clang] [llvm] [SimplifyCFG] Not folding branch in loop header with constant iterations (PR #74268)

2023-12-04 Thread via cfe-commits
xiangzh1 wrote: I think we should follow this principle: if a loop required to be unroll later, we should not distroy the loop count info. https://github.com/llvm/llvm-project/pull/74268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

  1   2   3   4   >