[clang] [X86][RFC] Support AVX10 options (PR #67278)

2023-10-17 Thread Phoebe Wang via cfe-commits
@@ -130,17 +131,35 @@ bool X86TargetInfo::initFeatureMap( continue; } -if (!HasAVX512F && Feature.substr(0, 7) == "+avx512") +if (Feature.substr(0, 7) == "+avx10.") { + HasAVX10 = true; HasAVX512F = true; -if (HasAVX512F && Feature == "-avx512

[clang] [clang][Diagnostics] Highlight code snippets (PR #66514)

2023-10-17 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= ,

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

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

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

2023-10-17 Thread via cfe-commits
mydeveloperday wrote: Phyllis https://github.com/llvm/llvm-project/pull/69249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-17 Thread Owen Pan via cfe-commits
@@ -1118,16 +1121,35 @@ void WhitespaceManager::alignTrailingComments() { } } -// We don't want to align namespace end comments. -const bool DontAlignThisComment = -I > 0 && C.NewlinesBefore == 0 && -Changes[I - 1].Tok->is(TT_NamespaceRBrace);

[clang] [clang-format] Don't align comments over scopes (PR #68743)

2023-10-17 Thread Owen Pan via cfe-commits
@@ -3191,20 +3191,146 @@ TEST_F(FormatTestComments, DontAlignNamespaceComments) { "}\n" "// Comment"; -#if 0 - // FIXME: The following comment is aligned with the namespace comment. verifyFormat("namespace A {\n" " int Foo;\n"

[clang] ed1d290 - [Driver][NFC] Remove identifier with the comment (#68351)

2023-10-17 Thread via cfe-commits
Author: Brad Smith Date: 2023-10-17T23:27:07-04:00 New Revision: ed1d29028492b28b4790690b275b3a095f56fa47 URL: https://github.com/llvm/llvm-project/commit/ed1d29028492b28b4790690b275b3a095f56fa47 DIFF: https://github.com/llvm/llvm-project/commit/ed1d29028492b28b4790690b275b3a095f56fa47.diff LO

[clang] [Driver][NFC] Remove identifier with the comment (PR #68351)

2023-10-17 Thread Brad Smith via cfe-commits
https://github.com/brad0 closed https://github.com/llvm/llvm-project/pull/68351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][NFC] Remove identifier with the comment (PR #68351)

2023-10-17 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/68351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove identifier with the comment (PR #68351)

2023-10-17 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/68351 >From 4cf784b8e73515c3120793ac0ec1cf59ef6da767 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Thu, 5 Oct 2023 16:23:58 -0400 Subject: [PATCH] [Driver][NFC] Remove identifier with the comment MaskRay suggested remo

[clang] [X86][RFC] Support AVX10 options (PR #67278)

2023-10-17 Thread Evgenii Kudriashov via cfe-commits
@@ -130,17 +131,35 @@ bool X86TargetInfo::initFeatureMap( continue; } -if (!HasAVX512F && Feature.substr(0, 7) == "+avx512") +if (Feature.substr(0, 7) == "+avx10.") { + HasAVX10 = true; HasAVX512F = true; -if (HasAVX512F && Feature == "-avx512

[clang-tools-extra] [X86][RFC] Support AVX10 options (PR #67278)

2023-10-17 Thread Evgenii Kudriashov via cfe-commits
@@ -130,17 +131,35 @@ bool X86TargetInfo::initFeatureMap( continue; } -if (!HasAVX512F && Feature.substr(0, 7) == "+avx512") +if (Feature.substr(0, 7) == "+avx10.") { + HasAVX10 = true; HasAVX512F = true; -if (HasAVX512F && Feature == "-avx512

[clang] [X86][RFC] Support AVX10 options (PR #67278)

2023-10-17 Thread Evgenii Kudriashov via cfe-commits
@@ -130,17 +131,35 @@ bool X86TargetInfo::initFeatureMap( continue; } -if (!HasAVX512F && Feature.substr(0, 7) == "+avx512") +if (Feature.substr(0, 7) == "+avx10.") { + HasAVX10 = true; HasAVX512F = true; -if (HasAVX512F && Feature == "-avx512

[clang] [Driver][DragonFly] Fixes for linker path and command-line option handling (PR #69095)

2023-10-17 Thread Brad Smith via cfe-commits
https://github.com/brad0 edited https://github.com/llvm/llvm-project/pull/69095 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver][DragonFly] Fixes for linker path and command-line option handling (PR #69095)

2023-10-17 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/69095 >From 7009758fba9b7053f6ea76033de7221f25722ed6 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 15 Oct 2023 04:00:56 -0400 Subject: [PATCH] [Driver][DragonFly] Fixes for linker path and command-line option hand

[clang] [CUDA][HIP] Fix host/device context in concept (PR #67721)

2023-10-17 Thread Yaxun Liu via cfe-commits
@@ -176,3 +176,34 @@ Predefined Macros * - ``HIP_API_PER_THREAD_DEFAULT_STREAM`` - Alias to ``__HIP_API_PER_THREAD_DEFAULT_STREAM__``. Deprecated. +C++20 Concepts with HIP and CUDA + + +In Clang, when working with HIP or CUDA, it's impor

[clang] [HIP] Document func ptr and virtual func (PR #68126)

2023-10-17 Thread via cfe-commits
https://github.com/b-sumner commented: Looks good to me. https://github.com/llvm/llvm-project/pull/68126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP] Document func ptr and virtual func (PR #68126)

2023-10-17 Thread Yaxun Liu via cfe-commits
@@ -176,3 +176,95 @@ Predefined Macros * - ``HIP_API_PER_THREAD_DEFAULT_STREAM`` - Alias to ``__HIP_API_PER_THREAD_DEFAULT_STREAM__``. Deprecated. +Compilation Modes += + +Each HIP source file contains intertwined device and host code. Depending on the

[clang] [HIP] Document func ptr and virtual func (PR #68126)

2023-10-17 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/68126 >From 52fa4eac701a411699ac0ffa8386b1b23ba9977e Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Tue, 3 Oct 2023 12:21:10 -0400 Subject: [PATCH 1/2] [HIP] Document func ptr and virtual func Document clang

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > > You could potentially link in all the symbols and internalize them That probably won't work. After they are internalized, they have internal linkage and cannot be used to resolve newly added call of the same function. The purpose of internalization is to allow you to opt

[libunwind] [RISCV][GlobalISel] Select G_FRAME_INDEX (PR #68254)

2023-10-17 Thread Nitin John Raj via cfe-commits
https://github.com/nitinjohnraj closed https://github.com/llvm/llvm-project/pull/68254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA][HIP] Fix deduction guide (PR #69366)

2023-10-17 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: nvcc behavior can be seen here https://godbolt.org/z/sY1vdYWKe https://godbolt.org/z/vTer7xa3j https://github.com/llvm/llvm-project/pull/69366 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [CUDA][HIP] Fix deduction guide (PR #69366)

2023-10-17 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/69366 >From b28384d33f858a6d4139da931b436cbf1a0a426a Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Sat, 14 Oct 2023 17:28:13 -0400 Subject: [PATCH] [CUDA][HIP] Fix deduction guide Currently clang assumes imp

[clang] [flang][driver] support -dumpversion and -dumpmachine (PR #68896)

2023-10-17 Thread Yuanfang Chen via cfe-commits
yuanfang-chen wrote: > Could this be implemented without any updates to Clang (beyond Options.td)? The options could work by changing options.td only. However, `CLANG_VERSION_STRING` and `FLANG_VERSION_STRING` could be different. This is to handle that. https://github.com/llvm/llvm-project/p

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

2023-10-17 Thread Owen Pan via cfe-commits
@@ -3497,6 +3497,15 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const { Tok->setType(TT_TrailingReturnArrow); break; } +if (Tok->isNot(TT_TrailingAnnotation)) owenca wrote: Before: look for _

[clang] [libc++] Fix inconsistency between is_lock_free and is_always_lock_free (PR #68109)

2023-10-17 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/68109 >From 84ae453ad32cad94038bdb1e91b4b5c422f3ceb3 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 3 Oct 2023 10:06:12 -0400 Subject: [PATCH 1/2] [libc++] Fix inconsistency between is_lock_free and is_always_

[clang-tools-extra] [libc++] Fix inconsistency between is_lock_free and is_always_lock_free (PR #68109)

2023-10-17 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/68109 >From 84ae453ad32cad94038bdb1e91b4b5c422f3ceb3 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Tue, 3 Oct 2023 10:06:12 -0400 Subject: [PATCH 1/2] [libc++] Fix inconsistency between is_lock_free and is_always_

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Aaron Puchert via cfe-commits
@@ -1061,11 +1061,13 @@ def Most : DiagGroup<"most", [ ]>; // Thread Safety warnings -def ThreadSafetyAttributes : DiagGroup<"thread-safety-attributes">; -def ThreadSafetyAnalysis : DiagGroup<"thread-safety-analysis">; -def ThreadSafetyPrecise: DiagGroup<"thread-safety-

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Aaron Puchert via cfe-commits
@@ -2278,7 +2303,7 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContext &AC) { PostOrderCFGView::CFGBlockSet VisitedBlocks(CFGraph); CFGBlockInfo &Initial = BlockInfo[CFGraph->getEntry().getBlockID()]; - CFGBlockInfo &Final = BlockInfo[CFGraph->getExit().getBl

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. Assuming that this is otherwise identical to the Phab review. I would suggest to add some release notes (in a separate change). https://github.com/llvm/llvm-project/pull/68572 ___ cfe-commits

[clang] Reapply "[clang analysis][thread-safety] Handle return-by-reference..… (PR #68572)

2023-10-17 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/68572 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes (PR #68379)

2023-10-17 Thread Paul Kirth via cfe-commits
ilovepi wrote: I think your analysis and approach sounds correct, but probably worth checking with someone a bit more familiar with all of the C++ nuance here. https://github.com/llvm/llvm-project/pull/68379 ___ cfe-commits mailing list cfe-commits@li

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > > This approach assumes that whatever the function call was transformed into > > also exists in the same library, which isn't necessarily true. > > True, good point. But I don't think it's necessarily due to this approach, > but more of how AMDGPULibCalls is implemented. It se

[clang] [clang][Sema] Use original template pattern when declaring implicit deduction guides for nested template classes (PR #68379)

2023-10-17 Thread via cfe-commits
antangelo wrote: When `SubstType` is called on the `const inner &` parameter to substitute the outer template args, it eventually calls `FindInstantiatedDecl` on the inner template pattern. The presence of the explicit deduction guide causes the outer template to already be instantiated at thi

[clang] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)

2023-10-17 Thread via cfe-commits
philnik777 wrote: You can use `// NOLINT(check-name)` or `// NOLINTNEXTLINE(check-name)` to disable clang-tidy warnings. I would probably put a `// NOLINTNEXTLINE(readability-function-cognitive-complexity)` above the function. https://github.com/llvm/llvm-project/pull/67023 ___

[clang-tools-extra] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)

2023-10-17 Thread via cfe-commits
philnik777 wrote: You can use `// NOLINT(check-name)` or `// NOLINTNEXTLINE(check-name)` to disable clang-tidy warnings. I would probably put a `// NOLINTNEXTLINE(readability-function-cognitive-complexity)` above the function. https://github.com/llvm/llvm-project/pull/67023 ___

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

2023-10-17 Thread Björn Schäpers via cfe-commits
@@ -3497,6 +3497,15 @@ void TokenAnnotator::calculateFormattingInformation(AnnotatedLine &Line) const { Tok->setType(TT_TrailingReturnArrow); break; } +if (Tok->isNot(TT_TrailingAnnotation)) HazardyKnusperkeks wrote: But wh

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

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

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

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

[clang-tools-extra] [libc++] Add assertions for potential OOB reads in std::nth_element (PR #67023)

2023-10-17 Thread Louis Dionne via cfe-commits
ldionne wrote: > That depends on what we want to do with these kinds of issues in general. I > think we should avoid making functions so complex. If we have a general > consensus there, I think we should just suppress the warning with a todo that > the function should be split up (or simplifie

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Jacob Lambert via cfe-commits
lamb-j wrote: > This approach assumes that whatever the function call was transformed into > also exists in the same library, which isn't necessarily true. True, good point. But I don't think it's necessarily due to this approach, but more of how AMDGPULibCalls is implemented. It seems like th

[clang] [clang][CodeGen] Emit annotations for function declarations. (PR #66716)

2023-10-17 Thread Brendan Dahl via cfe-commits
brendandahl wrote: @AaronBallman or @efriedma-quic ping are you able to add reviewers? https://github.com/llvm/llvm-project/pull/66716 ___ 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 check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,98 @@ +//===--- CoroutineHostileRAII.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-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall edited https://github.com/llvm/llvm-project/pull/68738 ___ 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 check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,98 @@ +//===--- CoroutineHostileRAII.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-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension +points in a coroutine. Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension +points in a coroutine. Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
@@ -0,0 +1,50 @@ +.. title:: clang-tidy - misc-coroutine-hostile-raii + +misc-coroutine-hostile-raii + + +Detects when objects of certain hostile RAII types persists across suspension +points in a coroutine. Such hostile types include scoped-lockable types and

[clang-tools-extra] [clang-tidy] Add check to diagnose coroutine-hostile RAII objects (PR #68738)

2023-10-17 Thread Sam McCall via cfe-commits
https://github.com/sam-mccall commented: Sorry to arrive late with this. This looks pretty solid, all comments optional, happy to stamp a followup commit if you find them useful. https://github.com/llvm/llvm-project/pull/68738 ___ cfe-commits mailing

[clang] [Driver] Remove identifier with the comment (PR #68351)

2023-10-17 Thread Fangrui Song via cfe-commits
MaskRay wrote: Add `NFC`? https://github.com/llvm/llvm-project/pull/68351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove identifier with the comment (PR #68351)

2023-10-17 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay approved this pull request. https://github.com/llvm/llvm-project/pull/68351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-17 Thread Yusra Syeda via cfe-commits
@@ -976,6 +976,24 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +int32_t ProductVersion, ProductRelea

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-17 Thread Yusra Syeda via cfe-commits
@@ -976,6 +976,24 @@ void CodeGenModule::Release() { Context.getTypeSizeInChars(Context.getWideCharType()).getQuantity(); getModule().addModuleFlag(llvm::Module::Error, "wchar_size", WCharWidth); + if (getTriple().isOSzOS()) { +int32_t ProductVersion, ProductRelea

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-17 Thread Yusra Syeda via cfe-commits
@@ -1296,6 +1372,124 @@ void SystemZAsmPrinter::emitPPA1(MCSymbol *FnEndSym) { 4); } +void SystemZAsmPrinter::emitStartOfAsmFile(Module &M) { + if (TM.getTargetTriple().isOSzOS()) +emitPPA2(M); + AsmPrinter::emitStartOfAsmFile(M); +}

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-17 Thread Yusra Syeda via cfe-commits
@@ -1026,6 +1036,68 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module &M) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("Product Major Version"))) +return cast(VersionVal->getValue(

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-17 Thread Yusra Syeda via cfe-commits
@@ -10,9 +10,49 @@ #include "clang/Config/config.h" #include "llvm/ADT/StringSwitch.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/FormatVariadic.h" #include "llvm/TargetParser/Triple.h" using namespace clang; +const char *clang::languageToString(Languag

[clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-10-17 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 5ea8bea2bdf345e2baee07e0a94ac40bd0f109c4 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 1/7] This change adds support for the PPA2 section in zOS --- clang

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/69377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -10,7 +10,12 @@ Guide: https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions -All parameters should be named, with identical names in the declaration and -implementation. +A parameter name may be omitted only if the parameter is not used

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL edited https://github.com/llvm/llvm-project/pull/69377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread Piotr Zegar via cfe-commits
@@ -10,7 +10,12 @@ Guide: https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions -All parameters should be named, with identical names in the declaration and -implementation. +A parameter name may be omitted only if the parameter is not used

[clang] [clang-format] Fix a bug in annotating TrailingReturnArrow (PR #69249)

2023-10-17 Thread Owen Pan via cfe-commits
owenca wrote: @HazardyKnusperkeks any other concerns? https://github.com/llvm/llvm-project/pull/69249 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Remove identifier with the comment (PR #68351)

2023-10-17 Thread Brad Smith via cfe-commits
brad0 wrote: @MaskRay Ping. https://github.com/llvm/llvm-project/pull/68351 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > sincos() is just one example. There are several other cases that can trigger > this issue. fold_rootn() generates new function calls for square and cubic > roots, fold_pow() does a similar thing for specific powers (ex 2), etc. > > We did try disabling -amdgpu-prelink, and it

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-17 Thread Paul Kirth via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-17 Thread Craig Topper via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] [clang-format]: Split alignment of declarations around assignment (PR #69340)

2023-10-17 Thread Björn Schäpers via cfe-commits
@@ -973,13 +974,51 @@ void WhitespaceManager::alignConsecutiveShortCaseStatements() { Changes); } -void WhitespaceManager::alignConsecutiveDeclarations() { +void WhitespaceManager::alignConsecutiveDeclarationsPreAssignment() { if (!Style.AlignC

[clang] [clang-format]: Split alignment of declarations around assignment (PR #69340)

2023-10-17 Thread Björn Schäpers via cfe-commits
@@ -18783,6 +18783,15 @@ TEST_F(FormatTest, AlignConsecutiveDeclarations) { " \"bb\"};\n" "int bbb = 0;", Alignment); + // http://llvm.org/PR68079 + verifyFormat("using Fn = int (A::*)();\n" +

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-17 Thread Paul Kirth via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[libunwind] [libunwind] Fix running tests with MSan (PR #67860)

2023-10-17 Thread Louis Dionne via cfe-commits
@@ -115,6 +121,18 @@ extern int unw_set_reg(unw_cursor_t *, unw_regnum_t, unw_word_t) LIBUNWIND_AVAIL extern int unw_set_fpreg(unw_cursor_t *, unw_regnum_t, unw_fpreg_t) LIBUNWIND_AVAIL; extern int unw_resume(unw_cursor_t *) LIBUNWIND_AVAIL; +#ifdef LIBUNWIND_HAVE_MSAN +//

[libunwind] [libunwind][test] Avoid calling back into libunwind on sanitizer errors (PR #67861)

2023-10-17 Thread Louis Dionne via cfe-commits
@@ -28,6 +28,14 @@ if @LIBUNWIND_USES_ARM_EHABI@: if not @LIBUNWIND_ENABLE_THREADS@: config.available_features.add('libunwind-no-threads') +config.extra_executor_env = "" ldionne wrote: Could we instead do something like this? ```diff diff --git a/libcxx

[libunwind] [libunwind][test] Avoid calling back into libunwind on sanitizer errors (PR #67861)

2023-10-17 Thread Louis Dionne via cfe-commits
https://github.com/ldionne requested changes to this pull request. > The underlying issues is fixed in > https://github.com/llvm/llvm-project/pull/67860 but if we ever introduce an > new MSan error inside libunwind we will see the same infinite recursion > because MSan diagnotics try to print

[libunwind] [libunwind][test] Avoid calling back into libunwind on sanitizer errors (PR #67861)

2023-10-17 Thread Louis Dionne via cfe-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/67861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: None (Da-Viper) Changes Fixes #41439 The documentation is update to say it is allowed to have omitted parameter names if the variable is not used --- Full diff: https://github.com/llvm/llvm-project/pull/69377.diff 1 Files Affect

[clang-tools-extra] Fix #41439: Update the documentation with the correct information. (PR #69377)

2023-10-17 Thread via cfe-commits
https://github.com/Da-Viper created https://github.com/llvm/llvm-project/pull/69377 Fixes #41439 The documentation is update to say it is allowed to have omitted parameter names if the variable is not used >From 0e0a3e7ad1a0a7098e05a5164413369eaa58c55b Mon Sep 17 00:00:00 2001 From: Ezike E

[clang] [RISCV] Implement shadow stack on shadow stack mode with Zicfiss. (PR #68075)

2023-10-17 Thread Craig Topper via cfe-commits
@@ -106,9 +111,14 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CSI, [&](CalleeSavedInfo &CSR) { return CSR.getReg() == RAReg; })) return; + const RISCVInstrInfo *TII = STI.getInstrInfo(); + if (STI.hasFeature(RISCV::FeatureStdExt

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 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 fbf0a77e80f18a6d0fd8a28833b0bc87a99b1b2f b7af255d2cb8f9a00d1977f92d4e3723ef0720bf --

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Jacob Lambert via cfe-commits
lamb-j wrote: sincos() is just one example. There are several other cases that can trigger this issue. fold_rootn() generates new function calls for square and cubic roots, fold_pow() does a similar thing for specific powers (ex 2) We did try disabling -llvm-prelink, and it did lead to a signi

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > This handles the edge case where optimization introduces new device library > functions, such as a fused sincos() from separate sin() and cos() calls. This seems like a pretty big change to solve just this problem. Could we not just put `nobuiltin` on said function to stop it

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jacob Lambert (lamb-j) Changes This set of patches updates device library linking and optimization to do the following: Link Optimize Link (New) This handles the edge case where optimization introduces new device library functions, such

[clang] Correctly link and optimize device libraries with -mlink-builtin-bitcode (PR #69371)

2023-10-17 Thread Jacob Lambert via cfe-commits
https://github.com/lamb-j created https://github.com/llvm/llvm-project/pull/69371 This set of patches updates device library linking and optimization to do the following: Link Optimize Link (New) This handles the edge case where optimization introduces new device library functions, such as a

[clang-tools-extra] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[libunwind] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[clang-tools-extra] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
@@ -0,0 +1,252 @@ +//===--===// ZijunZhaoCCK wrote: I add `robust` tests about projector, invoking and proxy iterators like `ranges::ends_with()` and `ranges::find()` but I don't add any `robust

[libunwind] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
@@ -0,0 +1,252 @@ +//===--===// ZijunZhaoCCK wrote: I add `robust` tests about projector, invoking and proxy iterators like `ranges::ends_with()` and `ranges::find()` but I don't add any `robust

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
@@ -0,0 +1,252 @@ +//===--===// ZijunZhaoCCK wrote: I add `robust` tests about projector, invoking and proxy iterators like `ranges::ends_with()` and `ranges::find()` but I don't add any `robust

[clang-tools-extra] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[clang] [libc++] Implement ranges::contains (PR #65148)

2023-10-17 Thread via cfe-commits
https://github.com/ZijunZhaoCCK updated https://github.com/llvm/llvm-project/pull/65148 >From 02e9afd761228f401df4d9f8dfaaca44ffae0c6e Mon Sep 17 00:00:00 2001 From: zijunzhao Date: Thu, 31 Aug 2023 20:08:32 + Subject: [PATCH 01/16] [libc++] Implement ranges::contains Differential Revision

[clang] [clang][index] Fix processing of CompoundAssignOperator at setting up reference roles (PR #69370)

2023-10-17 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aleksandr Platonov (ArcsinX) Changes Without this patch in expressions like `foo += 1` reference `foo` has no read and write roles. This happens because `CompoundAssignOperator` is also a `BinaryOperator`, thus handling `CompoindAssignOp

[clang] [clang][index] Fix processing of CompoundAssignOperator at setting up reference roles (PR #69370)

2023-10-17 Thread Aleksandr Platonov via cfe-commits
https://github.com/ArcsinX created https://github.com/llvm/llvm-project/pull/69370 Without this patch in expressions like `foo += 1` reference `foo` has no read and write roles. This happens because `CompoundAssignOperator` is also a `BinaryOperator`, thus handling `CompoindAssignOperator` in

[clang] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
https://github.com/bwendling closed https://github.com/llvm/llvm-project/pull/67193 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -2,8 +2,9 @@ ! invocation. These libraries are added on top of other standard runtime ! libraries that the Clang driver will include. -! RUN: %flang -### -target ppc64le-linux-gnu %S/Inputs/hello.f90 2>&1 | FileCheck %s --check-prefixes=CHECK,GNU +! RUN: %flang -### -targe

[clang] [Driver] Link Flang runtime on Solaris (PR #65644)

2023-10-17 Thread Fangrui Song via cfe-commits
@@ -21,12 +22,12 @@ ! run on any other platform, such as Windows that use a .exe ! suffix. Clang's driver will try to resolve the path to the ld ! executable and may find the GNU linker from MinGW or Cygwin. -! GNU-LABEL: "{{.*}}ld{{(\.exe)?}}" -! GNU-SAME: "

[clang-tools-extra] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
@@ -9066,21 +9066,18 @@ bool AArch64InstrInfo::shouldOutlineFromFunctionByDefault( void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB, MachineBasicBlock::iterator Iter, -

[clang] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
@@ -9066,21 +9066,18 @@ bool AArch64InstrInfo::shouldOutlineFromFunctionByDefault( void AArch64InstrInfo::buildClearRegister(Register Reg, MachineBasicBlock &MBB, MachineBasicBlock::iterator Iter, -

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/68999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e6d0b12 - Correctly compute conversion seq for args to fn with reversed param order (#68999)

2023-10-17 Thread via cfe-commits
Author: Utkarsh Saxena Date: 2023-10-17T20:53:42+02:00 New Revision: e6d0b126c824222fca2f31a2ba571c2ee2bb4760 URL: https://github.com/llvm/llvm-project/commit/e6d0b126c824222fca2f31a2ba571c2ee2bb4760 DIFF: https://github.com/llvm/llvm-project/commit/e6d0b126c824222fca2f31a2ba571c2ee2bb4760.diff

[clang] [CodeGen] Avoid potential sideeffects from XOR (PR #67193)

2023-10-17 Thread Bill Wendling via cfe-commits
https://github.com/bwendling updated https://github.com/llvm/llvm-project/pull/67193 >From 6db37f7f76347a7821d9a95c0fdac4e250df2e78 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 22 Sep 2023 12:35:09 -0700 Subject: [PATCH 1/5] [CodeGen] Avoid potential sideeffects from XOR XOR may cha

[clang] Correctly compute conversion seq for args to fn with reversed param order (PR #68999)

2023-10-17 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: +1 I agree that this is confusing and error prone. https://github.com/llvm/llvm-project/pull/68999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   >