[clang] [clang-tools-extra] [llvm] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-10 Thread Wei Xiao via cfe-commits
https://github.com/williamweixiao approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/68502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Check for valid location in ExtractionContext::exprIsValidOutside (PR #71162)

2023-11-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/71162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 5bd0f0d - [clangd] Check for valid location in ExtractionContext::exprIsValidOutside (#71162)

2023-11-10 Thread via cfe-commits
Author: Björn Pettersson Date: 2023-11-11T01:53:18-05:00 New Revision: 5bd0f0d9d635617b335dd0b259e971a605ad6776 URL: https://github.com/llvm/llvm-project/commit/5bd0f0d9d635617b335dd0b259e971a605ad6776 DIFF:

[clang-tools-extra] [clangd] Check for valid location in ExtractionContext::exprIsValidOutside (PR #71162)

2023-11-10 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/71162 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D123235: [OpenMP] atomic compare fail : Parser & AST support

2023-11-10 Thread Sunil K via Phabricator via cfe-commits
koops updated this revision to Diff 558076. koops added a comment. Removing default from switch statements. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123235/new/ https://reviews.llvm.org/D123235 Files: clang/include/clang/AST/OpenMPClause.h

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/71279 >From d73a8e2ee683e6812c21cb1de7363b14565a96d1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 4 Nov 2023 18:43:58 +0800 Subject: [PATCH 1/3] [clangd] Resolve the dependent type from its single

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-10 Thread Younan Zhang via cfe-commits
@@ -150,6 +246,11 @@ std::vector HeuristicResolver::resolveMemberExpr( if (ME->isArrow()) { BaseType = getPointeeType(BaseType); } + + if (BaseType->isDependentType()) zyn0217 wrote: I don't know if I should assume the non-nullity for `BaseType`:

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 updated https://github.com/llvm/llvm-project/pull/71279 >From d73a8e2ee683e6812c21cb1de7363b14565a96d1 Mon Sep 17 00:00:00 2001 From: Younan Zhang Date: Sat, 4 Nov 2023 18:43:58 +0800 Subject: [PATCH 1/2] [clangd] Resolve the dependent type from its single

[clang-tools-extra] [llvm] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-10 Thread Michal Paszkowski via cfe-commits
michalpaszkowski wrote: [Here are the slides](https://llvm.org/devmtg/2019-10/slides/Paszkowski-LLVMCanon.pdf) that were presented at the LLVM Dev Meeting in 2019. It might be useful to include the link in the commit message for reference. @nikic Thanks for catching more things in the

[clang-tools-extra] [llvm] [clang] [InstCombine] Convert or concat to fshl if opposite or concat exists (PR #68502)

2023-11-10 Thread via cfe-commits
HaohaiWen wrote: I'd like to merge it if no any more comments. https://github.com/llvm/llvm-project/pull/68502 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Restrict 'fopen' modeling to POSIX versions in SimpleStreamChecker (PR #72016)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ben Shi (benshi001) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/72016.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp (+21-29) - (modified)

[clang] [clang][analyzer] Restrict 'fopen' modeling to POSIX versions in SimpleStreamChecker (PR #72016)

2023-11-10 Thread Ben Shi via cfe-commits
https://github.com/benshi001 created https://github.com/llvm/llvm-project/pull/72016 None >From 327374741e5b73943a78879c0425eaf1abac1273 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Sat, 11 Nov 2023 11:31:57 +0800 Subject: [PATCH] [clang][analyzer] Restrict 'fopen' modeling to POSIX versions

[llvm] [clang-tools-extra] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-10 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/30] Add IRCanonicalizer.cpp ---

[llvm] [clang-tools-extra] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-10 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/29] Add IRCanonicalizer.cpp ---

[llvm] [clang] Add RunTimeLang to Class and Enumeration DIBuilder functions (PR #72011)

2023-11-10 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 bdd396f353582b50d0a9af5e5e809aeacc2848bf 82e6fefc0df010539519fefcae22c49d6c2a1459 --

[clang] [clang-format][NFC] Simplify parseBracedList() (PR #72010)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/72010.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+14-22) - (modified) clang/lib/Format/UnwrappedLineParser.h

[clang] [llvm] Add RunTimeLang to Class and Enumeration DIBuilder functions (PR #72011)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Augusto Noronha (augusto2112) Changes RunTimeLang is already supported by DICompositeType, and already used by structs and unions. Add a new parameter in the class and enumeration create methods, so they can use the RunTimeLang

[clang] [llvm] Add RunTimeLang to Class and Enumeration DIBuilder functions (PR #72011)

2023-11-10 Thread Augusto Noronha via cfe-commits
https://github.com/augusto2112 created https://github.com/llvm/llvm-project/pull/72011 RunTimeLang is already supported by DICompositeType, and already used by structs and unions. Add a new parameter in the class and enumeration create methods, so they can use the RunTimeLang attribute as

[clang] [clang-format][NFC] Simplify parseBracedList() (PR #72010)

2023-11-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/72010 None >From f3f303d80a40b9ce8a13721cfa108b4094b8b2c3 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 Nov 2023 17:34:06 -0800 Subject: [PATCH] [clang-format][NFC] Simplify parseBracedList() ---

[clang] [clang-tools-extra] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-10 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/28] Add IRCanonicalizer.cpp ---

[clang] [Clang][Sema] Differentiate between partial/explicit specializations when diagnosing unexpanded packs (PR #72015)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krystian Stasiowski (sdkrystian) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/72015.diff 4 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSemaKinds.td (+3-3) - (modified)

[clang] [Clang][Sema] Differentiate between partial/explicit specializations when diagnosing unexpanded packs (PR #72015)

2023-11-10 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian created https://github.com/llvm/llvm-project/pull/72015 None >From 394e2e0eed84f0102d194174a7c60048556c56dc Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Fri, 10 Nov 2023 20:51:12 -0500 Subject: [PATCH] [Clang] Differentiate between partial/explicit

[clang-tools-extra] [clangd] Let DefineOutline tweak create a definition from scratch (PR #71950)

2023-11-10 Thread Julian Schmidt via cfe-commits
5chmidti wrote: This implements clangd/clangd#445 https://github.com/llvm/llvm-project/pull/71950 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 3bb7ecc - Revert "[Clang] Generate test checks (NFC)"

2023-11-10 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2023-11-10T17:08:35-08:00 New Revision: 3bb7ecc5a515d2ddd2708257096e14e3fe3b839d URL: https://github.com/llvm/llvm-project/commit/3bb7ecc5a515d2ddd2708257096e14e3fe3b839d DIFF: https://github.com/llvm/llvm-project/commit/3bb7ecc5a515d2ddd2708257096e14e3fe3b839d.diff

[clang] 8ee07a4 - Revert "[IR] Mark lshr and ashr constant expressions as undesirable"

2023-11-10 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2023-11-10T17:08:35-08:00 New Revision: 8ee07a4be7f7d8654ecf25e7ce0a680975649544 URL: https://github.com/llvm/llvm-project/commit/8ee07a4be7f7d8654ecf25e7ce0a680975649544 DIFF: https://github.com/llvm/llvm-project/commit/8ee07a4be7f7d8654ecf25e7ce0a680975649544.diff

[clang] bdd396f - [Analysis] Make test require asserts

2023-11-10 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2023-11-10T17:29:32-08:00 New Revision: bdd396f353582b50d0a9af5e5e809aeacc2848bf URL: https://github.com/llvm/llvm-project/commit/bdd396f353582b50d0a9af5e5e809aeacc2848bf DIFF: https://github.com/llvm/llvm-project/commit/bdd396f353582b50d0a9af5e5e809aeacc2848bf.diff

[clang] c5dd1bb - Revert "Revert "[IR] Mark lshr and ashr constant expressions as undesirable""

2023-11-10 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2023-11-10T17:26:14-08:00 New Revision: c5dd1bbcc37e8811e7c6050159014d084eac6438 URL: https://github.com/llvm/llvm-project/commit/c5dd1bbcc37e8811e7c6050159014d084eac6438 DIFF: https://github.com/llvm/llvm-project/commit/c5dd1bbcc37e8811e7c6050159014d084eac6438.diff

[clang] 55ac332 - Revert "Revert "[Clang] Generate test checks (NFC)""

2023-11-10 Thread Shoaib Meenai via cfe-commits
Author: Shoaib Meenai Date: 2023-11-10T17:24:39-08:00 New Revision: 55ac33235db3635a797f98f4539d665bfacf92df URL: https://github.com/llvm/llvm-project/commit/55ac33235db3635a797f98f4539d665bfacf92df DIFF: https://github.com/llvm/llvm-project/commit/55ac33235db3635a797f98f4539d665bfacf92df.diff

[clang] [clang-tools-extra] [clang][AST] Fix crash in MatchChildASTVisitor::TraverseLambdaExpr (PR #70962)

2023-11-10 Thread via cfe-commits
cor3ntin wrote: + @AaronBallman Having a nullptr init capture seems fishy, do we actually mean to allow capturing vla by reference here? https://github.com/llvm/llvm-project/pull/70962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Print static_assert values of arithmetic binary operators (PR #71671)

2023-11-10 Thread via cfe-commits
@@ -17219,10 +17219,10 @@ static bool UsefulToPrintExpr(const Expr *E) { if (const auto *UnaryOp = dyn_cast(E)) return UsefulToPrintExpr(UnaryOp->getSubExpr()); - // Ignore nested binary operators. This could be a FIXME for improvements - // to the diagnostics in the

[clang] [clang][Sema] Avoid non-empty unexpanded pack assertion for FunctionParmPackExpr (PR #69224)

2023-11-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/69224 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [clang] Fix false positive -Wmissing-field-initializer for anonymous unions (PR #70829)

2023-11-10 Thread via cfe-commits
@@ -654,11 +655,17 @@ void InitListChecker::FillInEmptyInitForBase( } } -void InitListChecker::FillInEmptyInitForField(unsigned Init, FieldDecl *Field, -const InitializedEntity , -

[clang] [analyzer] Move security.cert.env.InvalidPtr out of alpha (PR #71912)

2023-11-10 Thread Endre Fülöp via cfe-commits
https://github.com/gamesh411 edited https://github.com/llvm/llvm-project/pull/71912 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Interp] Handle SizeOfPackExprs (PR #71929)

2023-11-10 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM, thanks https://github.com/llvm/llvm-project/pull/71929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [mlir] [flang] [llvm] [libc] [libcxx] [openmp] [clang-tools-extra] [clang] GlobalISel: Guide return in llvm::getIConstantSplatVal (PR #71989)

2023-11-10 Thread Changpeng Fang via cfe-commits
changpeng wrote: > Any tests? Encountered this issue during a downstream branch testing. No test for trunk yet but think the issue should be here. https://github.com/llvm/llvm-project/pull/71989 ___ cfe-commits mailing list

[lldb] [clang] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-10 Thread Michael Buch via cfe-commits
https://github.com/Michael137 updated https://github.com/llvm/llvm-project/pull/71780 >From e5bc858c35b479d29174c9945c6c67f4d2dc085b Mon Sep 17 00:00:00 2001 From: Michael Buch Date: Thu, 9 Nov 2023 01:13:21 + Subject: [PATCH 1/4] Reland "[clang][DebugInfo] Emit global variable

[PATCH] D138846: MC/DC in LLVM Source-Based Code Coverage: LLVM back-end and compiler-rt

2023-11-10 Thread Alan Phipps via Phabricator via cfe-commits
alanphipps added a comment. In D138846#4656594 , @hans wrote: > Just a heads up that we're seeing crashes in the Rust compiler which bisects > to this change. Investigating in > https://bugs.chromium.org/p/chromium/issues/detail?id=1500558 Thank you

[clang-tools-extra] [mlir] [libcxx] [llvm] [libc] [flang] [openmp] [clang] [lldb] GlobalISel: Guide return in llvm::getIConstantSplatVal (PR #71989)

2023-11-10 Thread Stanislav Mekhanoshin via cfe-commits
rampitec wrote: Any tests? https://github.com/llvm/llvm-project/pull/71989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D147073: [Coverage] Handle invalid end location of an expression/statement.

2023-11-10 Thread Zequan Wu via Phabricator via cfe-commits
zequanwu added inline comments. Comment at: clang/lib/CodeGen/CoverageMappingGen.cpp:607 +// compiler has broken. +assert((!StartLoc || StartLoc->isValid()) && "Start location is not valid"); +assert((!EndLoc || EndLoc->isValid()) && "End location is not valid");

[clang-tools-extra] [llvm] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-10 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/26] Add IRCanonicalizer.cpp ---

[llvm] [compiler-rt] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-10 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Chatted with @MaskRay offline, we come to an agreement that it's not good to use relying on the bit in __llvm_profile_raw_version to decide whether or not to dump data/name sections at runtime for the reasons mentioned above. Sent a PR: #71996 > Even if we have a way to fix

[llvm] [clang-tools-extra] [clang] [LLVM] Add IRNormalizer Pass (PR #68176)

2023-11-10 Thread Justin Fargnoli via cfe-commits
https://github.com/justinfargnoli updated https://github.com/llvm/llvm-project/pull/68176 >From f792a030ac1761a96176332fea906cd2d1826c7b Mon Sep 17 00:00:00 2001 From: justinfargnoli Date: Sat, 12 Aug 2023 10:58:45 -0700 Subject: [PATCH 01/25] Add IRCanonicalizer.cpp ---

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes This patch doesn't work for do-while loops. Fixed #64474. --- Full diff: https://github.com/llvm/llvm-project/pull/71995.diff 4 Files Affected: - (modified) clang/docs/ClangFormatStyleOptions.rst

[clang] [clang-format] Handle control statements in BreakAfterAttributes (PR #71995)

2023-11-10 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/71995 This patch doesn't work for do-while loops. Fixed #64474. >From b67ea36d180e700cc6b0661e8f2390eda515c566 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 10 Nov 2023 00:21:58 -0800 Subject: [PATCH]

[clang] 7318fe6 - [OpenMP][FIX] Ensure device reduction geps work for multi-var reductions

2023-11-10 Thread Johannes Doerfert via cfe-commits
Author: Johannes Doerfert Date: 2023-11-10T14:34:46-08:00 New Revision: 7318fe633487f9b9187e18c7ebd4c6516ded9a22 URL: https://github.com/llvm/llvm-project/commit/7318fe633487f9b9187e18c7ebd4c6516ded9a22 DIFF:

[clang] [clang] Enable --gcc-install-dir for RISCV baremetal toolchains (PR #71803)

2023-11-10 Thread via cfe-commits
mihailo-stojanovic wrote: I believe that more information can be found in the [commit](https://github.com/llvm/llvm-project/commit/45ba2392d7e00aedd4d9fb04070dbae8a7fbbeeb) which added the `RISCVToolChain::hasGCCToolchain` method. As far as I could gather, before this was merged, the only

[clang-tools-extra] [clangd] Resolve the dependent type from its single instantiation. Take 1 (PR #71279)

2023-11-10 Thread via cfe-commits
@@ -150,6 +246,11 @@ std::vector HeuristicResolver::resolveMemberExpr( if (ME->isArrow()) { BaseType = getPointeeType(BaseType); } + + if (BaseType->isDependentType()) sr-tream wrote: Check BaseType before access (line 254)

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
@@ -41,6 +41,10 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls, } if (const auto *OpCallExpr = dyn_cast(E)) { +if (const auto *MethodDecl = +dyn_cast_or_null(OpCallExpr->getDirectCallee())) + return !MethodDecl->isConst();

[lldb] [mlir] [flang] [libc] [openmp] [llvm] [clang] [libcxx] [clang-tools-extra] GlobalISel: Guide return in llvm::getIConstantSplatVal (PR #71989)

2023-11-10 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 0448a1c0dc131835301a59db7138d504b836a591 23d34569183f405fdae0a8a665be8b7772addebe --

[llvm] [compiler-rt] [clang-tools-extra] [clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-10 Thread via cfe-commits
https://github.com/smanna12 updated https://github.com/llvm/llvm-project/pull/70762 >From 93d46d40f46663cfa30fc01da965887508684e25 Mon Sep 17 00:00:00 2001 From: "Manna, Soumi" Date: Mon, 30 Oct 2023 21:41:00 -0700 Subject: [PATCH 01/11] [clang] Add support for new loop attribute

[compiler-rt] [clang] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-11-10 Thread Artem Belevich via cfe-commits
Artem-B wrote: Would it be feasible to consider switching to the new offloading driver mode and really link with the library instead? It may be a conveniently isolated use case with little/no existing users that would disrupt. https://github.com/llvm/llvm-project/pull/71978

[openmp] [clang-tools-extra] [libcxx] [libc] [mlir] [lldb] [llvm] [flang] [clang] GlobalISel: Guide return in llvm::getIConstantSplatVal (PR #71989)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-globalisel Author: Changpeng Fang (changpeng) Changes getIConstantVRegValWithLookThrough could return NULL. --- Full diff: https://github.com/llvm/llvm-project/pull/71989.diff 1 Files Affected: - (modified) llvm/lib/CodeGen/GlobalISel/Utils.cpp

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread Piotr Zegar via cfe-commits
@@ -41,6 +41,10 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls, } if (const auto *OpCallExpr = dyn_cast(E)) { +if (const auto *MethodDecl = +dyn_cast_or_null(OpCallExpr->getDirectCallee())) + return !MethodDecl->isConst();

[clang] [clang] Allow __attribute__((swiftcall)) on all targets (PR #71986)

2023-11-10 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 199fc973ced20016b04ba540cf63a1d4914fa513 d2df2830b4417c0ecc9690c4092053bf465a5d44 --

[clang] [clang] Allow __attribute__((swiftcall)) on all targets (PR #71986)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Kuba (Brecka) Mracek (kubamracek) Changes With Embedded Swift, https://forums.swift.org/t/embedded-swift/67057;, it becomes possible and useful to produce Swift code for a whole range of CPU targets. This change allows using the

[clang] [clang] Allow __attribute__((swiftcall)) on all targets (PR #71986)

2023-11-10 Thread Kuba Mracek via cfe-commits
https://github.com/kubamracek created https://github.com/llvm/llvm-project/pull/71986 With Embedded Swift, , it becomes possible and useful to produce Swift code for a whole range of CPU targets. This change allows using the 'swiftcall' and

[clang] [clang] Make `-fvisibility={}` and `-ftype-visibility={}` benign options. (PR #71985)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Juergen Ributzka (ributzka) Changes Both options do not affect the AST content that is serialized into the PCM. This commit includes the following changes: 1.) Mark `-fvisibility={}` and `-ftype-visibility={}` as benign options. That

[clang] [clang] Make `-fvisibility={}` and `-ftype-visibility={}` benign options. (PR #71985)

2023-11-10 Thread Juergen Ributzka via cfe-commits
https://github.com/ributzka created https://github.com/llvm/llvm-project/pull/71985 Both options do not affect the AST content that is serialized into the PCM. This commit includes the following changes: 1.) Mark `-fvisibility={}` and `-ftype-visibility={}` as benign options. That means

[llvm] [clang-tools-extra] [clang] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71935)

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

[clang] 199fc97 - [clang-format] Handle variable declarations in BreakAfterAttributes (#71935)

2023-11-10 Thread via cfe-commits
Author: Owen Pan Date: 2023-11-10T13:25:57-08:00 New Revision: 199fc973ced20016b04ba540cf63a1d4914fa513 URL: https://github.com/llvm/llvm-project/commit/199fc973ced20016b04ba540cf63a1d4914fa513 DIFF: https://github.com/llvm/llvm-project/commit/199fc973ced20016b04ba540cf63a1d4914fa513.diff

[llvm] [clang-tools-extra] [clang] [clang] Add support for new loop attribute [[clang::code_align()]] (PR #70762)

2023-11-10 Thread via cfe-commits
https://github.com/smanna12 edited https://github.com/llvm/llvm-project/pull/70762 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] [lldb] [flang] [lld] [llvm] [libc] [clang] [compiler-rt] [asan] Report executable/DSO name for report_globals=2 and odr-violation checking (PR #71879)

2023-11-10 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/71879 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
schenker wrote: > I'm not sure now if this wont cause too much false-positives, after all this > is why CheckFunctionCalls option were added. Sometimes object can have 2 same > operators, one const and one not, in such case depend on "this" type, > non-const could be used, this would be

[llvm] [clang] [openmp] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-10 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/71739 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 237adfc - [OpenMP] Rework handling of global ctor/dtors in OpenMP (#71739)

2023-11-10 Thread via cfe-commits
Author: Joseph Huber Date: 2023-11-10T14:53:53-06:00 New Revision: 237adfca4ef8d94b7d3d8817da615c5e5897c3da URL: https://github.com/llvm/llvm-project/commit/237adfca4ef8d94b7d3d8817da615c5e5897c3da DIFF: https://github.com/llvm/llvm-project/commit/237adfca4ef8d94b7d3d8817da615c5e5897c3da.diff

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
@@ -41,6 +41,10 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls, } if (const auto *OpCallExpr = dyn_cast(E)) { +if (const auto *MethodDecl = +dyn_cast_or_null(OpCallExpr->getDirectCallee())) + return !MethodDecl->isConst();

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
@@ -41,6 +41,10 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls, } if (const auto *OpCallExpr = dyn_cast(E)) { +if (const auto *FuncDecl = OpCallExpr->getDirectCallee()) + if (const auto *MethodDecl = dyn_cast(FuncDecl)) +return

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
https://github.com/schenker updated https://github.com/llvm/llvm-project/pull/71974 >From dabfdee1a982000605e4b33930ba433c63d1684f Mon Sep 17 00:00:00 2001 From: Thomas Schenker Date: Fri, 10 Nov 2023 18:58:26 +0100 Subject: [PATCH 1/3] [clang-tidy] bugprone-assert-side-effect non-const

[llvm] [clang] [compiler-rt] [HIP] support 128 bit int division (PR #71978)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Yaxun (Sam) Liu (yxsamliu) Changes Currently nvcc supports 128 bit int division in device code. This patch adds support of 128 bit int division to HIP. It builds lib functions for 128 bit division in compiler-rt for amdgcn target.

[compiler-rt] [clang] [llvm] [HIP] support 128 bit int division (PR #71978)

2023-11-10 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu created https://github.com/llvm/llvm-project/pull/71978 Currently nvcc supports 128 bit int division in device code. This patch adds support of 128 bit int division to HIP. It builds lib functions for 128 bit division in compiler-rt for amdgcn target. Then links

[clang] [-Wunsafe-buffer-usage] Add FixableGadget for AddAssign in UnspecifiedUntypedContext (PR #71862)

2023-11-10 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: Very nice!! https://github.com/llvm/llvm-project/pull/71862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [-Wunsafe-buffer-usage] Add FixableGadget for AddAssign in UnspecifiedUntypedContext (PR #71862)

2023-11-10 Thread Artem Dergachev via cfe-commits
@@ -1028,6 +1028,50 @@ class UPCPreIncrementGadget : public FixableGadget { } }; +// Representing a pointer type expression of the form `Ptr += n` in an +// Unspecified Untyped Context (UUC): +class UUCAddAssignGadget : public FixableGadget { +private: + static constexpr

[clang] [-Wunsafe-buffer-usage] Add FixableGadget for AddAssign in UnspecifiedUntypedContext (PR #71862)

2023-11-10 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/71862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 09273d4 - Fix WebKit static analyzers to support ref and deref methods to be defined on different classes. (#69985)

2023-11-10 Thread via cfe-commits
Author: Ryosuke Niwa Date: 2023-11-10T12:21:36-08:00 New Revision: 09273d408da97022f3146cfd11328c1a8ce50d10 URL: https://github.com/llvm/llvm-project/commit/09273d408da97022f3146cfd11328c1a8ce50d10 DIFF: https://github.com/llvm/llvm-project/commit/09273d408da97022f3146cfd11328c1a8ce50d10.diff

[clang] Fix WebKit static analyzers to support ref and deref methods to be defined on different classes. (PR #69985)

2023-11-10 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ closed https://github.com/llvm/llvm-project/pull/69985 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL requested changes to this pull request. I'm not sure now if this wont cause too much false-positives, after all this is why CheckFunctionCalls option were added. Sometimes object can have 2 same operators, one const and one not, in such case depend on "this" type,

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread Piotr Zegar via cfe-commits
@@ -41,6 +41,10 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls, } if (const auto *OpCallExpr = dyn_cast(E)) { +if (const auto *MethodDecl = +dyn_cast_or_null(OpCallExpr->getDirectCallee())) + return !MethodDecl->isConst();

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: One more question, there is option for this check: "CheckFunctionCalls Whether to treat non-const member and non-member functions as they produce side effects. Disabled by default because it can increase the number of false positive warnings." Won't this overlap this change ?

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
https://github.com/schenker updated https://github.com/llvm/llvm-project/pull/71974 >From dabfdee1a982000605e4b33930ba433c63d1684f Mon Sep 17 00:00:00 2001 From: Thomas Schenker Date: Fri, 10 Nov 2023 18:58:26 +0100 Subject: [PATCH 1/2] [clang-tidy] bugprone-assert-side-effect non-const

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
https://github.com/schenker updated https://github.com/llvm/llvm-project/pull/71974 >From dabfdee1a982000605e4b33930ba433c63d1684f Mon Sep 17 00:00:00 2001 From: Thomas Schenker Date: Fri, 10 Nov 2023 18:58:26 +0100 Subject: [PATCH 1/2] [clang-tidy] bugprone-assert-side-effect non-const

[clang] [-Wunsafe-buffer-usage] Add FixableGadget for AddAssign in UnspecifiedUntypedContext (PR #71862)

2023-11-10 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud updated https://github.com/llvm/llvm-project/pull/71862 >From 6636745d1c444747a33c91b366a730d81ca5db5a Mon Sep 17 00:00:00 2001 From: Rashmi Mudduluru Date: Wed, 1 Nov 2023 13:43:12 -0700 Subject: [PATCH 1/6] [-Wunsafe-buffer-usage][WIP] Fixable gadget for AddAssign

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-10 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard edited https://github.com/llvm/llvm-project/pull/70845 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-10 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard updated https://github.com/llvm/llvm-project/pull/70845 From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001 From: leo-ard Date: Mon, 30 Oct 2023 18:01:27 -0400 Subject: [PATCH 01/13] Add NonNeg check for InstCombine ---

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-10 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 3f906f513edea5c21867586d92151c4268230fe4 3f2ad99f9a6d177ea2747bfc0e559aad1faf8639 --

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-10 Thread Léonard Oest O'Leary via cfe-commits
@@ -0,0 +1,175 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 +; See PR-70845 for more details +; RUN: opt < %s -S -passes=instcombine | FileCheck %s + + +define signext i32 @sext_sext(i16 %x, i16 %y) {

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-10 Thread Léonard Oest O'Leary via cfe-commits
@@ -247,6 +355,19 @@ define i1 @sext_zext_uge_op0_wide(i16 %x, i8 %y) { ret i1 %c } + +define i1 @sext_zext_nneg_uge_op0_wide(i16 %x, i8 %y) { +; CHECK-LABEL: @sext_zext_nneg_uge_op0_wide( +; CHECK-NEXT:[[TMP1:%.*]] = sext i8 [[Y:%.*]] to i16 +; CHECK-NEXT:[[C:%.*]]

[clang] [clang-tools-extra] [llvm] [clang-format] Handle variable declarations in BreakAfterAttributes (PR #71935)

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

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-10 Thread Léonard Oest O'Leary via cfe-commits
@@ -0,0 +1,175 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3 +; See PR-70845 for more details +; RUN: opt < %s -S -passes=instcombine | FileCheck %s + + +define signext i32 @sext_sext(i16 %x, i16 %y) { +; CHECK-LABEL: define

[llvm] [clang] [Instcombine] use zext's nneg flag for icmp folding (PR #70845)

2023-11-10 Thread Léonard Oest O'Leary via cfe-commits
https://github.com/leo-ard updated https://github.com/llvm/llvm-project/pull/70845 From 00d0c18b5414ffe7222e1ee0ad5ecfdb8783704e Mon Sep 17 00:00:00 2001 From: leo-ard Date: Mon, 30 Oct 2023 18:01:27 -0400 Subject: [PATCH 01/12] Add NonNeg check for InstCombine ---

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread Piotr Zegar via cfe-commits
@@ -41,6 +41,10 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls, } if (const auto *OpCallExpr = dyn_cast(E)) { +if (const auto *FuncDecl = OpCallExpr->getDirectCallee()) PiotrZSL wrote: Merge this FuncDecl with MethodDecl by using

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread Piotr Zegar via cfe-commits
@@ -41,6 +41,10 @@ AST_MATCHER_P2(Expr, hasSideEffect, bool, CheckFunctionCalls, } if (const auto *OpCallExpr = dyn_cast(E)) { +if (const auto *FuncDecl = OpCallExpr->getDirectCallee()) + if (const auto *MethodDecl = dyn_cast(FuncDecl)) +return

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. Update documentation of this check to mention this, and update release notes. Code looks fine. https://github.com/llvm/llvm-project/pull/71974 ___ cfe-commits mailing list

[clang] [clang][CodeGen] Ensure consistent `mustprogress` attribute emission across all paths (PR #71452)

2023-11-10 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/71452 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (schenker) Changes With this PR, `bugprone-assert-side-effect` assumes that operator methods that are not marked as `const` have side effects. This matches the existing rule for non-operator methods. E.g. the following snippet

[clang-tools-extra] [clang-tidy] bugprone-assert-side-effect non-const operator methods (PR #71974)

2023-11-10 Thread via cfe-commits
https://github.com/schenker created https://github.com/llvm/llvm-project/pull/71974 With this PR, `bugprone-assert-side-effect` assumes that operator methods that are not marked as `const` have side effects. This matches the existing rule for non-operator methods. E.g. the following snippet

[llvm] [openmp] [clang] [OpenMP] Rework handling of global ctor/dtors in OpenMP (PR #71739)

2023-11-10 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/71739 >From e0281fc280385286c3d5da7de619e793bd3b6bea Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Tue, 7 Nov 2023 17:12:31 -0600 Subject: [PATCH] [OpenMP] Rework handling of global ctor/dtors in OpenMP Summary:

[llvm] [compiler-rt] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-10 Thread Fangrui Song via cfe-commits
MaskRay wrote: I am nervous with new `if (hasCorrelation())` conditions as well. If you use the same name for a non-SHF_ALLOC section and a SHF_ALLOC section, the linked output has the SHF_ALLOC flag and you cannot tell what components were non-SHF_ALLOC. ``` .section

[PATCH] D101617: [clang-tidy] Tweak diag ranges for bugprone-sizeof-expression

2023-11-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL updated this revision to Diff 558075. PiotrZSL added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101617/new/ https://reviews.llvm.org/D101617 Files: clang-tools-extra/clang-tidy/bugprone/SizeofExpressionCheck.cpp

[PATCH] D101617: [clang-tidy] Tweak diag ranges for bugprone-sizeof-expression

2023-11-10 Thread Piotr Zegar via Phabricator via cfe-commits
PiotrZSL accepted this revision. PiotrZSL added a comment. This revision is now accepted and ready to land. Herald added a project: All. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D101617/new/ https://reviews.llvm.org/D101617

[libc] [compiler-rt] [clang-tools-extra] [flang] [libcxx] [llvm] [clang] [libcxx] Unifying __is_trivial_equality_predicate and __is_trivial_plus_operation into __desugars_to (PR #68642)

2023-11-10 Thread Anton Rydahl via cfe-commits
https://github.com/AntonRydahl updated https://github.com/llvm/llvm-project/pull/68642 >From f0d93cc6a5cd485c654ab38221691db038bacc7d Mon Sep 17 00:00:00 2001 From: AntonRydahl Date: Mon, 9 Oct 2023 15:13:22 -0700 Subject: [PATCH 01/13] Merged __is_trivial_equality_predicate and

  1   2   3   >