[clang] e7deca5 - [AArch64] Alter arm_fp16.h to be target-based, not preprocessor based.

2022-11-03 Thread David Green via cfe-commits
Author: David Green Date: 2022-11-03T16:06:35Z New Revision: e7deca525058778df15e7888ed24974a32c8686c URL: https://github.com/llvm/llvm-project/commit/e7deca525058778df15e7888ed24974a32c8686c DIFF: https://github.com/llvm/llvm-project/commit/e7deca525058778df15e7888ed24974a32c8686c.diff LOG: [

[PATCH] D125860: [clang] Only use major version in resource dir

2022-11-03 Thread Sylvestre Ledru via Phabricator via cfe-commits
sylvestre.ledru added a comment. i hope not too many people rely on it. LGTM but please add it to the release notes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125860/new/ https://reviews.llvm.org/D125860 ___ cfe-commits mailing list cfe-co

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 472961. manojgupta added a comment. restore back to C++ only Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/ https://reviews.llvm.org/D136712 Files: clang/lib/Basic/Targets/ARM.cpp clang/test/

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 472962. manojgupta added a comment. Restore back to C++ only. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/ https://reviews.llvm.org/D136712 Files: clang/lib/Basic/Targets/ARM.cpp clang/test

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Aart Bik via Phabricator via cfe-commits
aartbik added a comment. LGTM for sparse changes (note that you could have made your life a bit easier if you had broken this revision up at least over different projects, getting a global "LGTM" from somebody may be a bit hard now ;-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Louis Dionne via Phabricator via cfe-commits
ldionne accepted this revision. ldionne added a comment. Thanks for the fixes. LGTM for `libcxx/`, `libcxxabi/` and `libunwind/`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137338/new/ https://reviews.llvm.org/D137338 __

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. Looked at the lldb changes, some comments for you. If you want to get a "looks good" for those please submit a separate review with only the lldb parts and I'll review that instead. As others said, appreciate the effort but the review process doesn't scale well t

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Changes to `openmp` look good to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137338/new/ https://reviews.llvm.org/D137338 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D136894: Add clang-doc readme

2022-11-03 Thread Brett Wilson via Phabricator via cfe-commits
brettw added a comment. I definitely wasn't intending to write "formal documentation" for clang-doc. I was trying to write some notes for a future contributor as I'm winding down my work here, and it seems nobody else is working on it or has any knowledge about it. Is there a place in LLVM for

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686

2022-11-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Seems fine, though looking at `llvm::X86::CPUKind`, why do you choose `llvm::X86::CK_PentiumPro` as the lower bounds? Surely `llvm::X86::CK_Pentium2` doesn't support CET? Do

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Siva Chandra via Phabricator via cfe-commits
sivachandra accepted this revision. sivachandra added a comment. Changes in the libc directory LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137338/new/ https://reviews.llvm.org/D137338 ___ cfe-com

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686

2022-11-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D137317#3905643 , @nickdesaulniers wrote: > Seems fine, though looking at `llvm::X86::CPUKind`, why do you choose > `llvm::X86::CK_PentiumPro` as the lower bounds? Surely > `llvm::X86::CK_Pentium2` doesn't support CET?

[PATCH] D137317: [X86][CET] Add Diags for targets pre to i686

2022-11-03 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers added a comment. In D137317#3905654 , @craig.topper wrote: > In D137317#3905643 , > @nickdesaulniers wrote: > >> Seems fine, though looking at `llvm::X86::CPUKind`, why do you choose >> `llvm::X

[PATCH] D136848: [clang][AST] Compare UnresolvedLookupExpr in structural equivalence.

2022-11-03 Thread Balázs Kéri via Phabricator via cfe-commits
balazske updated this revision to Diff 472971. balazske added a comment. Try to fix test failures on Windows pre-merge check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136848/new/ https://reviews.llvm.org/D136848 Files: clang/lib/AST/ASTStru

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 472975. ymandel marked 2 inline comments as done. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137334/new/ https://reviews.llvm.org/D137334 Files: clang/include/cla

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel marked 2 inline comments as done. ymandel added inline comments. Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:365 if (IsSet1 == nullptr) - return true; + return IsSet2 ? ComparisonStatus::Same : ComparisonStatus::Di

[PATCH] D137304: [clang] Store filename per include instead of mutating filename

2022-11-03 Thread Ben Barham via Phabricator via cfe-commits
bnbarham added inline comments. Comment at: clang/include/clang/Basic/SourceManager.h:147-163 /// Indicates whether the buffer itself was provided to override /// the actual file contents. /// /// When true, the original entry may be a virtual file that does not //

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D137154#3904810 , @hdelan wrote: > In DPC++ for CUDA we use libclc as a wrapper around CUDA SDK's libdevice. > Like libdevice we want to precompile libclc to bc for the CUDA backend > without specializing for a particular arch

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Dmitri Gribenko via Phabricator via cfe-commits
gribozavr2 accepted this revision. gribozavr2 added inline comments. This revision is now accepted and ready to land. Comment at: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironment.h:73-74 +/// Returns: +/// `Same`:`Val1` is equivalent to `Val2`, according

[PATCH] D137343: [clang] add -Wvla-stack-allocation

2022-11-03 Thread Tao Liang via Phabricator via cfe-commits
Origami404 created this revision. Herald added a project: All. Origami404 edited the summary of this revision. Origami404 edited the summary of this revision. Origami404 added reviewers: aaron.ballman, efriedma. Origami404 added a subscriber: inclyc. Origami404 published this revision for review. H

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-03 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. In D137154#3905711 , @yaxunl wrote: > LLVM does not maintain bitcode backward compatibility between major releases. > How do you make sure the clang/LLVM you are using is compatible with > libdevice? Yes it does? We support bitc

[PATCH] D136811: WIP: RFC: NFC: C++ Buffer Hardening user documentation.

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/SafeBuffers.rst:31 +convert large amounts of old code to conform to the warning; + - Attribute ``[[unsafe_buffer_usage]]`` lets you annotate custom functions as +unsafe, while providing a safe alternative that c

[PATCH] D137334: [clang][dataflow] Generalize custom comparison to return tri-value result.

2022-11-03 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel updated this revision to Diff 472978. ymandel added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137334/new/ https://reviews.llvm.org/D137334 Files: clang/include/clang/Analysis/FlowSensitive/DataflowEnvironm

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/test/Driver/arm-baremetal-defines.cpp:1 +// RUN: %clang --target=arm-none-eabi -march=armv7-m %s -emit-llvm -S -c -o - 2>&1 | FileCheck %s + MaskRay wrote: > Move this to `test/Preprocessor/init-arm.c` test/Prepro

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay accepted this revision. MaskRay added a comment. This revision is now accepted and ready to land. LG with a test nit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/ https://reviews.llvm.org/D136712 __

[PATCH] D137251: [clang][cuda/hip] Allow `__noinline__` lambdas

2022-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: clang/lib/Parse/ParseExprCXX.cpp:1300 +ParseGNUAttributes(Attr, nullptr, &D); + } else if (Tok.is(tok::kw___noinline__)) { +IdentifierInfo *AttrName = Tok.getIdentifierInfo(); Pierre-vh wrote: > aaron

[PATCH] D137251: [clang][cuda/hip] Allow `__noinline__` lambdas

2022-11-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D137251#3904618 , @Pierre-vh wrote: > Comments > > Not sure if the release note is in the right place though. > As for the test, I did something quite targeted/minimal, hope it's fine? LGTM. Thanks. Repository: rG LLVM Gith

[PATCH] D137251: [clang][cuda/hip] Allow `__noinline__` lambdas

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM aside from some very minor nits. Comment at: clang/docs/ReleaseNotes.rst:618 + - Allow the use of `__noinline__` as a keyword (instead of `__attribute__

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/docs/ReleaseNotes.rst:782-783 operator. -- ``clang_Cursor_getNumTemplateArguments``, ``clang_Cursor_getTemplateArgumentKind``, - `

[PATCH] D137082: [clang][Interp] Fix dereferencing arrays with no offset applied

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! I think this is a more clear approach than the previous one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137082/new/ https://reviews.llvm.org/D137082 __

[PATCH] D137240: [clang][Interp] Support alignof()

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:444 +// alignment of the referenced type. +if (const ReferenceType *Ref = ArgType->getAs()

[PATCH] D135721: [HLSL] Added HLSL this as a reference

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:179 +AST, SourceLocation(), +Constructor->getThisType().getTypePtr()->getPointeeType(), true); +This->setValueKind(ExprValueKind::VK_LValue); gracejenni

[PATCH] D136090: Handle errors in expansion of response files

2022-11-03 Thread Serge Pavlov via Phabricator via cfe-commits
sepavloff added a comment. Thank you for reporting the issue. It was fixed in fdab9f1203ee . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136090/new/ https://reviews.llvm.org/D1

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/include/clang/Sema/Sema.h:9602-9604 +return Ctx.Context == + ExpressionEvaluationContext::PotentiallyEvaluatedIfUsed || + Ctx.IsCheckingDefaultArgumentOrInitializer; aaron.ballman wrote:

[PATCH] D90121: clang-format: Add a consumer to diagnostics engine

2022-11-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. This is a bit out of left field, but these comments reminded me of something - a long time ago I was working on fixing some Clang layering to potentially use explicit modules more in our internal build (& then hopefully in the upstream/external build) and one major hol

[PATCH] D137346: -Wunsafe-buffer-usage: A way to transition away from raw buffer accesses.

2022-11-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: aaron.ballman, gribozavr2, xazax.hun, jkorous, t-rasmud, ziqingluo-90, malavikasamak. Herald added subscribers: steakhal, martong, rnkovacs. Herald added a project: All. NoQ requested review of this revision. This is the initial commit for `-Wunsafe

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. NVPTX has no current uses of this, so if the mangling needs to change, now would be the good time. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136919/new/ https://reviews.llvm.org/D136919 ___

[PATCH] D136811: -Wunsafe-buffer-usage: WIP: RFC: NFC: User documentation.

2022-11-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/docs/SafeBuffers.rst:114 + insufficient without such hardening. + (TODO: Will automatic fixits be able to suggest custom containers or views?) + (TODO: Explain how to implement such checks in a custom container?)

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. Thanks for the review Shafik, I'll address the other comments later. Comment at: clang/test/SemaCXX/cxx2a-consteval-default-params.cpp:10 +{ +return undefined(); // expected-error {{not a constant expression}} \ +

[PATCH] D137348: -Wunsafe-buffer-usage: Introduce an abstraction for fixable code patterns.

2022-11-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ created this revision. NoQ added reviewers: aaron.ballman, gribozavr2, xazax.hun, jkorous, t-rasmud, ziqingluo-90, malavikasamak. Herald added subscribers: steakhal, martong, rnkovacs. Herald added a project: All. NoQ requested review of this revision. This patch introduces a hierarchy of `Ga

[PATCH] D136936: [clang][Interp] Handle undefined functions better

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/AST/Interp/ByteCodeEmitter.cpp:24-31 + bool HasBody = true; + + // Function is not defined at all or not yet. We will + // create

[PATCH] D137348: -Wunsafe-buffer-usage: Introduce an abstraction for fixable code patterns.

2022-11-03 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:37 +#include "clang/Analysis/Analyses/UnsafeBufferUsageGadgets.def" +#undef GADGETS + }; Whoops typo! Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D137340: [clang-tidy] Add modernize-use-anonymous-namespace check

2022-11-03 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp updated this revision to Diff 472995. carlosgalvezp added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137340/new/ https://reviews.llvm.org/D137340 Files: clang-tools-extra/clang-tidy/modernize/

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Philip Reames via Phabricator via cfe-commits
reames created this revision. reames added reviewers: craig.topper, asb, frasercrmck, kito-cheng, jrtc27. Herald added subscribers: sunshaoce, VincentWu, StephenFan, vkmr, jdoerfert, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, Mar

[PATCH] D136846: [Driver] Add -fsample-profile-use-profi

2022-11-03 Thread Sergey Pupyrev via Phabricator via cfe-commits
spupyrev added a comment. Thanks @HaoyuZhang for adding the flag and the documentation. I just edited the message a bit; otherwise looks good. Comment at: clang/docs/UsersManual.rst:2244 + [OPTIONAL] During the sampling, the profiles may have errors or missing + blocks. Pr

[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2022-11-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: bolt/lib/RuntimeLibs/RuntimeLibrary.cpp:32 SmallString<128> LibPath = llvm::sys::path::parent_path(Dir); - llvm::sys::path::append(LibPath, "lib" LLVM_LIBDIR_SUFFIX); + llvm::sys::path::append(LibPath, CMAKE_INSTALL_LIBDIR); if (!

[PATCH] D137337: Replace LLVM_LIBDIR_SUFFIX by CMAKE_INSTALL_LIBDIR

2022-11-03 Thread Shilei Tian via Phabricator via cfe-commits
tianshilei1992 added a comment. Can you verify if projects enabled by `LLVM_ENABLE_RUNTIMES` (not `LLVM_ENABLE_PROJECTS`) will still be installed properly, aka in LLVM's lib directory? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137337/new/ https://reviews.llvm.org/D137337

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Philip Reames via Phabricator via cfe-commits
reames added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:437 + +// RUN: %clang -target riscv64 -march=rv64ixventanacondops -x c -E -dM %s \ +// RUN: -o - | FileCheck --check-prefix=CHECK-XVENTANACONDOPS-EXT %s Naming wise, is xven

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Philip Reames via Phabricator via cfe-commits
reames updated this revision to Diff 473001. reames added a comment. Fix silly typo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137350/new/ https://reviews.llvm.org/D137350 Files: clang/test/Preprocessor/riscv-target-features.c llvm/docs/RISCVUsage.rst llvm/lib/Support/RISCVISA

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 473002. cor3ntin added a comment. - rename `/IsCheckingDefaultArgumentOrInitializer/IsCurrentlyCheckingDefaultArgumentOrInitializer` following offline discussion with Aaron - Address Shafik comments - Revert WS change - add comment explaining the `check_la

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added reviewers: clang-vendors, rjmccall. aaron.ballman added a subscriber: rjmccall. aaron.ballman added a comment. Adding clang-vendors because of the potential ABI break concerns and @rjmccall for the Itanium ABI questions specifically. In D136919#3904925

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta updated this revision to Diff 473004. manojgupta added a comment. Updated test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/ https://reviews.llvm.org/D136712 Files: clang/lib/Basic/Targets/ARM.cpp clang/test/Preprocesso

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: clang/test/Preprocessor/riscv-target-features.c:437 + +// RUN: %clang -target riscv64 -march=rv64ixventanacondops -x c -E -dM %s \ +// RUN: -o - | FileCheck --check-prefix=CHECK-XVENTANACONDOPS-EXT %s reames wrote:

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Amir Ayupov via Phabricator via cfe-commits
Amir accepted this revision. Amir added a comment. BOLT changes LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137338/new/ https://reviews.llvm.org/D137338 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 473006. cor3ntin added a comment. Add parentheses to make check clearer Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136554/new/ https://reviews.llvm.org/D136554 Files: clang/docs/ReleaseNotes.rst clang/

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Jez Ng via Phabricator via cfe-commits
int3 added a comment. lld/MachO changes lgtm Comment at: lld/MachO/Driver.cpp:1386 // ld64 does something really weird. It attempts to realign the value to the -// page size, but assumes the the page size is 4K. This doesn't work with +// page size, but assumes th

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Do these need their own DecoderNameSpace? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137350/new/ https://reviews.llvm.org/D137350 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 8 inline comments as done. cor3ntin added inline comments. Comment at: clang/include/clang/Sema/Sema.h:9602-9604 +return Ctx.Context == + ExpressionEvaluationContext::PotentiallyEvaluatedIfUsed || + Ctx.IsCheckingDefaultArgumentOrInitia

[PATCH] D136554: Implement CWG2631

2022-11-03 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done and an inline comment as not done. cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:5918 +if (const FunctionDecl *FD = E->getDirectCallee()) + HasImmediateCalls |= FD->isConsteval(); +return RecursiveAS

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. We talked about this on the Itanium list, and as currently specified, it is absolutely not correct for `__bf16` to have the same mangling as `std::bfloat16_t`, because these types do not have the same semantics. If GCC did that, it is a bug. That discussion was here:

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. The clang parts generally LG, but I spotted a few things. Thank you for this cleanup effort! Comment at: clang/include/clang/ASTMatchers/ASTMatchersInternal.h:467 - /// Return a matcher that that points to the same implementation, but sets th

[PATCH] D135721: [HLSL] Added HLSL this as a reference

2022-11-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:179 +AST, SourceLocation(), +Constructor->getThisType().getTypePtr()->getPointeeType(), true); +This->setValueKind(ExprValueKind::VK_LValue); aaron.ballman wrot

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 Thread Artem Belevich via Phabricator via cfe-commits
tra accepted this revision. tra added a comment. This revision is now accepted and ready to land. LGTM, modulo separating clang-related change into a separate patch. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1262-1265 +if (identify_magic((*BufferO

[clang] 20132d8 - Link libclangBasic against libatomic when necessary.

2022-11-03 Thread Michał Górny via cfe-commits
Author: Sam James Date: 2022-11-03T21:07:44+01:00 New Revision: 20132d8eaa68a6c53e152718beda1dc0f4c9ff6c URL: https://github.com/llvm/llvm-project/commit/20132d8eaa68a6c53e152718beda1dc0f4c9ff6c DIFF: https://github.com/llvm/llvm-project/commit/20132d8eaa68a6c53e152718beda1dc0f4c9ff6c.diff LOG

[PATCH] D136282: [clang] [CMake] Link libclangBasic against libatomic when necessary.

2022-11-03 Thread Michał Górny via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG20132d8eaa68: Link libclangBasic against libatomic when necessary. (authored by thesamesam, committed by mgorny). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D136919: [X86][RFC] Change mangle name of __bf16 from u6__bf16 to DF16b

2022-11-03 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In D136919#3906133 , @rjmccall wrote: > We talked about this on the Itanium list, and as currently specified, it is > absolutely not correct for `__bf16` to have the same mangling as > `std::bfloat16_t`, because `__bf16` does n

[PATCH] D136811: -Wunsafe-buffer-usage: WIP: RFC: NFC: User documentation.

2022-11-03 Thread Jan Korous via Phabricator via cfe-commits
jkorous added a comment. Thank you for the feedback Gábor! Comment at: clang/docs/SafeBuffers.rst:36-37 +hardened mode where C++ classes such as ``std::vector`` and ``std::span``, +together with their respective ``iterator`` classes, are protected +at runtime agains

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Philip Reames via Phabricator via cfe-commits
reames added a comment. In D137350#3906126 , @craig.topper wrote: > Do these need their own DecoderNameSpace? What is a decoder namespace? Some quick grepping and googling isn't very informative. Comment at: llvm/lib/Target/RISCV/R

[PATCH] D137154: Adding nvvm_reflect clang builtin

2022-11-03 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:827 +BUILTIN(__nvvm_reflect, "icC*", "nc") + Do we actually need this patch at all. `extern "C" int __nvvm_reflect(const char *);` appears to work just fine already: https://go

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Philip Reames via Phabricator via cfe-commits
reames updated this revision to Diff 473022. reames added a comment. Address review comments from @craig.topper CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137350/new/ https://reviews.llvm.org/D137350 Files: clang/test/Preprocessor/riscv-target-features.c llvm/docs/RISCVUsage.rst

[PATCH] D137340: [clang-tidy] Add modernize-use-anonymous-namespace check

2022-11-03 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. I'm not entirely sure why this belongs in the modernize module given anonymous namespaces have been in c++ forever, maybe its more of a misc check? Also the modernize checks are meant to actually emit fixes(ignore the c arrays check :) ), Right now, this only warn, it

[PATCH] D135987: [clangBasic] Refactor StaticAnalyzer to use `clang::SarifDocumentWriter`

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for this refactoring, I really like the direction it's going! I've not spotted anything concerning, but if someone can double-check conformance to SARIF in terms of the changes to the tests, that would be appreciated. It looks like precommit CI found a r

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Comment at: clang/lib/CodeGen/CodeGenTBAA.cpp:341 if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) { - // Handle C++ base classes. Non-virtual bases can treated a a kind of + // Handle C++ base classes. Non-virtual bases can treated a

[PATCH] D137338: Fix dupe word typos

2022-11-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/CodeGen/CodeGenTBAA.cpp:341 if (const CXXRecordDecl *CXXRD = dyn_cast(RD)) { - // Handle C++ base classes. Non-virtual bases can treated a a kind of + // Handle C++ base classes. Non-virtual bases can treat

[PATCH] D137024: [compiler-rt] Switch from llvm-config to find_package(LLVM)

2022-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D137024#3905181 , @mgorny wrote: >> These workarounds are fine for me, but I wonder if it would be useful with a >> more direct cmake option to tell it not look for these files at all. > > CMake has something like that built-

[clang] 2497d5a - Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via cfe-commits
Author: Manoj Gupta Date: 2022-11-03T13:58:47-07:00 New Revision: 2497d5aa7716a664c4f73df1980b026c906c7522 URL: https://github.com/llvm/llvm-project/commit/2497d5aa7716a664c4f73df1980b026c906c7522 DIFF: https://github.com/llvm/llvm-project/commit/2497d5aa7716a664c4f73df1980b026c906c7522.diff L

[PATCH] D136712: Define _GNU_SOURCE for arm baremetal in C++ mode.

2022-11-03 Thread Manoj Gupta via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2497d5aa7716: Define _GNU_SOURCE for arm baremetal in C++ mode. (authored by manojgupta). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136712/new/ https://

[PATCH] D137340: [clang-tidy] Add modernize-use-anonymous-namespace check

2022-11-03 Thread Carlos Galvez via Phabricator via cfe-commits
carlosgalvezp added a comment. In D137340#3906250 , @njames93 wrote: > I'm not entirely sure why this belongs in the modernize module given > anonymous namespaces have been in c++ forever, maybe its more of a misc > check? Also the modernize checks are

[PATCH] D137350: [RISCV] Implement assembler support for XVentanaCondOps

2022-11-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D137350#3906234 , @reames wrote: > In D137350#3906126 , @craig.topper > wrote: > >> Do these need their own DecoderNameSpace? > > What is a decoder namespace? Some quick grepping

[PATCH] D137302: [clang-tidy] Add modernize-type-traits check

2022-11-03 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 473028. njames93 marked 3 inline comments as done. njames93 added a comment. Address documentation comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137302/new/ https://reviews.llvm.org/D137302 Files:

[PATCH] D136811: -Wunsafe-buffer-usage: WIP: RFC: NFC: User documentation.

2022-11-03 Thread Gábor Horváth via Phabricator via cfe-commits
xazax.hun added inline comments. Comment at: clang/docs/SafeBuffers.rst:31 +convert large amounts of old code to conform to the warning; + - Attribute ``[[unsafe_buffer_usage]]`` lets you annotate custom functions as +unsafe, while providing a safe alternative that can o

[PATCH] D136894: Add clang-doc readme

2022-11-03 Thread Paul Kirth via Phabricator via cfe-commits
paulkirth added a comment. In D136894#3905638 , @brettw wrote: > I definitely wasn't intending to write "formal documentation" for clang-doc. > I was trying to write some notes for a future contributor as I'm winding down > my work here, and it seems no

[PATCH] D136815: [clang][Interp] Unify visiting variable declarations

2022-11-03 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.h:282 + bool isGlobalDecl(const VarDecl *VD) const { +return !VD->hasLocalStorage() || VD->isConstexpr(); + } tbaeder wrote: > shafik wrote: > > tbaeder wrote: > > > shafik wrote

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 Thread Joseph Huber via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG3384f05a2cdb: [llvm-objdump][Offload] Use common offload extraction method (authored by jhuber6). Repository: rG LLVM Github Monorepo CHANGES SIN

[clang] 3384f05 - [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-11-03T16:19:13-05:00 New Revision: 3384f05a2cdb96a2f106c234ae8a9d0e306717a4 URL: https://github.com/llvm/llvm-project/commit/3384f05a2cdb96a2f106c234ae8a9d0e306717a4 DIFF: https://github.com/llvm/llvm-project/commit/3384f05a2cdb96a2f106c234ae8a9d0e306717a4.diff

[PATCH] D136796: [llvm-objdump][Offload] Use common offload extraction method

2022-11-03 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:1262-1265 +if (identify_magic((*BufferOrErr)->getBuffer()) == +file_magic::elf_shared_object) + continue; + tra wrote: > jhenderson wrote: > > This

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D137313#3904805 , @ABataev wrote: > Whyt it is NFC? I assume it fixes the dereferencing of references, right? Thanks Alexey. I really don't expect run time change for this change. The change only change BP/PP of the map inste

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D137107#3905443 , @zahiraam wrote: > and the same assembly (load __imp_?val) (is that why you made the comment > above?). And the test case runs. Yes, pretty much - the actual value of the address of `&val` isn't known at c

[PATCH] D137327: [clang-format] Handle object instansiation in if-statements

2022-11-03 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/TokenAnnotator.cpp:366 + CurrentToken->is(tok::identifier) && + !Next->isOneOf(tok::equal, tok::l_brace)) { Prev->setType(TT_BinaryOperator); Could you a

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-03 Thread Zahira Ammarguellat via Phabricator via cfe-commits
zahiraam added a comment. In D137107#3906413 , @mstorsjo wrote: > In D137107#3905443 , @zahiraam > wrote: > >> and the same assembly (load __imp_?val) (is that why you made the comment >> above?). And the test c

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-03 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:5056-5059 + "if (A) { \\\n" + "B(); \\\n" + "}\\\n" + "C();\n" owenpan wrote

[PATCH] D137181: [clang-format] Don't use 'PPIndentWidth' inside multi-line macros

2022-11-03 Thread Noah Goldstein via Phabricator via cfe-commits
goldstein.w.n added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:5056-5059 + "if (A) { \\\n" + "B(); \\\n" + "}\\\n" + "C();\n" goldstein.w.n

[PATCH] D137259: [clang][modules][deps] WIP: In-memory module transfer

2022-11-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 473043. jansvoboda11 added a comment. Handle macros Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137259/new/ https://reviews.llvm.org/D137259 Files: clang/include/clang/Frontend/CompilerInstance.h cl

[Diffusion] rGfdab9f1203ee: [Clang] Check for response file existence prior to check for recursion

2022-11-03 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a subscriber: cfe-commits. BRANCHES main Users: sepavloff (Author) https://reviews.llvm.org/rGfdab9f1203ee ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-com

[PATCH] D137107: Allow MS extension: support of constexpr with __declspec(dllimport).

2022-11-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D137107#3906439 , @zahiraam wrote: > Here is an even smaller test case. > lib.cpp: > __declspec(dllexport) int val=12; > > t1.cpp: > int main () { > > extern int _declspec(dllimport) val; > int& val_ref = val; > return v

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added a comment. Do we have a runtime test for this? Would be good to try to test it if the offloading fails and the host version is executed instead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137313/new/ https://reviews.llvm.org/D1373

[clang] c9a9593 - clang/cmake: Simplify lit detection for standalone builds

2022-11-03 Thread Tom Stellard via cfe-commits
Author: Tom Stellard Date: 2022-11-03T15:12:55-07:00 New Revision: c9a959334707810795f7e8c56ab6dd55ff0a359d URL: https://github.com/llvm/llvm-project/commit/c9a959334707810795f7e8c56ab6dd55ff0a359d DIFF: https://github.com/llvm/llvm-project/commit/c9a959334707810795f7e8c56ab6dd55ff0a359d.diff

[PATCH] D137224: clang/cmake: Simplify lit detection for standalone builds

2022-11-03 Thread Tom Stellard via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc9a959334707: clang/cmake: Simplify lit detection for standalone builds (authored by tstellar). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137224/new/ ht

[PATCH] D137313: [NFC] Remove redundant loads when has_device_addr is used.

2022-11-03 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. In D137313#3906487 , @ABataev wrote: > Do we have a runtime test for this? Would be good to try to test it if the > offloading fails and the host version is executed instead. I have runtime test in https://reviews.llvm.org/D134268

[PATCH] D137058: [Driver] [Modules] Support -fsave-std-c++-module-file (1/2)

2022-11-03 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a subscriber: rsmith. dblaikie added a comment. I realize I got this jumbled up and the thread about "why do we need to name things" is meant to be over in D137059 (sorry @ben.boeckel :/ I know this is all confusing to follow at the best of time

<    1   2   3   >