[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:26 }; - struct Nonlit { Nonlit(); }; // expected-note {{not literal}} + struct Nonlit { // cxx2a-note {{'Nonlit' is not literal becaus}} +Nonlit();

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3-2b.cpp:17-22 +constexpr int g() { // expected-error {{constexpr function never produces a constant expression}} + goto test;// expected-note {{subexpression not

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. I summary my suggestion in general, excluding some inline comments about coding details. 1. Seperate the location movement of test files into a different patch A. 2. Seperate the elimination of `AVRRelaxMemPass` / combination into `expand` to a different patch B. 3.

[PATCH] D97625: fix check-clang-tools tests that fail due to Windows CRLF line endings

2022-03-19 Thread Brian Cain via Phabricator via cfe-commits
bcain added a comment. Herald added a project: All. In D97625#3337018 , @dmgreen wrote: > Hello. I noticed this was applied to the base /test directory in the llvm > repo: https://github.com/llvm/llvm-project/tree/main/test > Was it intended be in

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added a comment. > I think labels can be left as is. Yes, the `static`, `thread_local`, label, and `goto` cases would all categorically contribute to a IFNDR program in the older modes (and we currently reliably diagnose them in the definition context).

[PATCH] D122087: Add HLSL Language Option and Preprocessor

2022-03-19 Thread Pete Cooper via Phabricator via cfe-commits
pete accepted this revision. pete added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122087/new/ https://reviews.llvm.org/D122087 ___

[PATCH] D122069: [Clang] Add binary format for bundling offloading metadata

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 416749. jhuber6 added a comment. Changing to add alignment to the global variable. Should ensure that the section alignment is correct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122069/new/

[PATCH] D122089: [CUDA] Add getTargetFeatures for the NVPTX toolchain

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, tra, tianshilei1992, yaxunl. Herald added a subscriber: asavonic. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: cfe-commits, sstefan1. Herald added a project: clang. The NVPTX

[PATCH] D122087: Add HLSL Language Option and Preprocessor

2022-03-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: MaskRay, tstellar, pete, jdoerfert, sheredom, kuhar, antiagainst, nhaehnle, rnk. Herald added a subscriber: dexonsmith. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Bringing in HLSL as a

[PATCH] D122085: Add clang DirectX target support

2022-03-19 Thread Pete Cooper via Phabricator via cfe-commits
pete accepted this revision. pete added a comment. This revision is now accepted and ready to land. All seems very reasonable to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122085/new/ https://reviews.llvm.org/D122085

[PATCH] D122085: Add clang DirectX target support

2022-03-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: MaskRay, tstellar, pete, jdoerfert, sheredom, kuhar, antiagainst, nhaehnle, rnk. Herald added a subscriber: mgorny. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This change adds a stub

[PATCH] D122083: [Concepts] Fix placeholder constraints when references are involved

2022-03-19 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson created this revision. Herald added a project: All. royjacobson requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Placeholder types were not checked for constraint satisfaction when modified by references. GitHub issue #54443

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/test/Transforms/InstCombine/icmp-or.ll:382 + ret i1 %5 +} + RKSimon wrote: > What about if the ctpop has multi uses? The ctpop isn't being changed. Does it matter if it has more uses? What is interesting is

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-19 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added inline comments. Comment at: llvm/test/Transforms/InstCombine/icmp-or.ll:382 + ret i1 %5 +} + What about if the ctpop has multi uses? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122077/new/

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-19 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:2613 + if (Value *V = foldOrOfCtpop(LHS, RHS, Builder)) +return V; Should we also handle the opposite version `ctpop(x) != 1 && x != 0`?

[PATCH] D122077: [InstCombine] Fold (ctpop(X) == 1) | (X == 0) into ctpop(X) < 2

2022-03-19 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/test/Transforms/InstCombine/icmp-or.ll:371 + +define i1 @ctpop_or_eq_to_ctpop(i32 %0) { +; CHECK-LABEL: @ctpop_or_eq_to_ctpop( Please add a test with vector type. Comment at:

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-19 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:378 +type = type->isReferenceType() + ? Context.getPointerType(type->getPointeeType()) + : type; vabridgers wrote:

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-19 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers updated this revision to Diff 416735. vabridgers marked an inline comment as not done. vabridgers added a comment. add updated test cases per comments from NoQ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119601/new/

[PATCH] D121961: [clang] Produce a "multiversion" annotation in textual AST output.

2022-03-19 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added a comment. > I was surprised to see the Windows CI pass with that sed invocation! Ha! I didn't even think about that. I had copied the `RUN` lines from another test and only adjusted what was necessary. The bots must have Cygwin, MSYS[2], GnuWin32, or similar installed.

[PATCH] D122078: [clang-tidy] Ignore concepts in `misc-redundant-expression`

2022-03-19 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: hokein, njames93, aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. Izaron requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. The

[PATCH] D122069: [Clang] Add binary format for bundling offloading metadata

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 416719. jhuber6 added a comment. Fix test after increasing alignment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122069/new/ https://reviews.llvm.org/D122069 Files:

[PATCH] D121961: [clang] Produce a "multiversion" annotation in textual AST output.

2022-03-19 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 was surprised to see the Windows CI pass with that `sed` invocation!) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D122075: [clang-tidy] Skip parentheses in `readability-make-member-function-const`

2022-03-19 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron created this revision. Izaron added reviewers: mgehre-amd, njames93, aaron.ballman. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. Izaron requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits.

[PATCH] D122069: [Clang] Add binary format for bundling offloading metadata

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 updated this revision to Diff 416713. jhuber6 added a comment. Update alignment to worse-case padding of 16. I'm not sure if there's a bette solution for preventing the linker from adding padding between these sections if they are combined. Repository: rG LLVM Github Monorepo

[PATCH] D121969: Pass split-machine-functions to code generator when flto is used

2022-03-19 Thread Wenlei He via Phabricator via cfe-commits
wenlei added inline comments. Comment at: clang/test/Driver/split-machine-functions.c:2 +// Split machine functions only work for ELF, so disable the test on Windows +// UNSUPPORTED: system-windows + My understanding is that if you specify target, e.g. `-target

[PATCH] D122069: [Clang] Add binary format for bundling offloading metadata

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 added inline comments. Comment at: clang/include/clang/Basic/Offloading.h:1 +//===--- Offloading.h - Utilities for handling offloading code -*- C++ -*-===// +// Not sure if this should live in Clang or LLVM. Repository: rG LLVM Github Monorepo

[PATCH] D122069: [Clang] Add binary format for bundling offloading metadata

2022-03-19 Thread Joseph Huber via Phabricator via cfe-commits
jhuber6 created this revision. jhuber6 added reviewers: jdoerfert, JonChesterfield. Herald added subscribers: ormris, dexonsmith, hiraditya, mgorny. Herald added a project: All. jhuber6 requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, sstefan1. Herald added

[PATCH] D119476: Generalize and harmonize sub-expression traversal

2022-03-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. Thanks! Could you help me land it? Author: Kim Gräsman . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119476/new/ https://reviews.llvm.org/D119476 ___ cfe-commits mailing list

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1256 - auto MIBHI = buildMI(MBB, MBBI, OpHi) - .addReg(DstReg, getKillRegState(DstIsKill)) - .addImm(Imm + 1) - .addReg(SrcHiReg,

[PATCH] D119477: Ignore FullExpr when traversing cast sub-expressions

2022-03-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr updated this revision to Diff 416695. kimgr added a comment. Address review feedback - Restore accidentally removed test line - Clarify diagnostic expectations Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119477/new/

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1253 +.addReg(DstReg, RegState::Define) +.addReg(DstReg) +.addImm(-Imm); ``` buildMI(MBB, MBBI, AVR::SBCIWRdK) .addReg(DstReg,

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1240 + + MachineOperand = MI.getOperand(2); + Register SrcReg = Src.getReg(); Also, I did not find any other use of `Src` Repository: rG LLVM Github Monorepo

[PATCH] D119601: [analyzer] Refactor makeNull to makeNullWithWidth (NFC)

2022-03-19 Thread Vince Bridgers via Phabricator via cfe-commits
vabridgers added inline comments. Comment at: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:378 +type = type->isReferenceType() + ? Context.getPointerType(type->getPointeeType()) + : type; NoQ wrote: >

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1234 + + MachineOperand = MI.getOperand(0); + Register DstReg = Dst.getReg(); Why we need an extra `Dst` local variable here? I did not find there is any more use

[PATCH] D121271: [C++20] [Modules] Don't generate strong function of a partition in importing modules

2022-03-19 Thread Iain Sandoe via Phabricator via cfe-commits
iains added a comment. it looks like the test case is failing everywhere - perhaps as a result of changes in the mangling scheme? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121271/new/ https://reviews.llvm.org/D121271

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added inline comments. Comment at: llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp:1246 + // few operations + if (Imm >= 63) { +if (!DstIsKill) { I suggest we make another patch for merge `AVRRelaxMem::relax` into `expand`, for the case `Imm >=

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. I find some test files locations are moved, I suggested you create a seperate patch for that, and this patch only focuses on fixing the instruction selection failure. Also I can help review and commit the other patch. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D122064: [clang-format][docs] Fix incorrect 'clang-format 11' option markers

2022-03-19 Thread Krystian Kuzniarek via Phabricator via cfe-commits
kuzkry added a comment. Here's a list of earliest commits where each option changed in this PR was introduced: AllowShortBlocksOnASingleLine - introduced by 17605d396118f3066a0bd4dfd128b7a8893f8b94 DeriveLineEnding - introduced by 358eaa3dcea1dee6350c2cbf80aab3c25db4d4d9

[PATCH] D114611: [AVR] Expand STDWSPQRr & STDSPQRr, approach #2

2022-03-19 Thread Ben Shi via Phabricator via cfe-commits
benshi001 added a comment. It would be better to write a clear commit message with clear title. [AVR] Expand pseudo instructions STDWSPQRr & STDSPQRr 1. What is the issue / Why there is a failure in instruction selection ? 2. How you fix it. This is just my suggestion, a unique clear

[PATCH] D122064: [clang-format][docs] Fix incorrect 'clang-format 11' option markers

2022-03-19 Thread Krystian Kuzniarek via Phabricator via cfe-commits
kuzkry created this revision. kuzkry added reviewers: MyDeveloperDay, HazardyKnusperkeks. kuzkry added a project: clang-format. Herald added a project: All. kuzkry requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Introduced by 23a5090c6

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked an inline comment as done. cor3ntin added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp:1-3 +// RUN: %clang_cc1 -verify -fcxx-exceptions -triple=x86_64-linux-gnu -std=c++11 -Werror=c++14-extensions -Werror=c++20-extensions

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin marked 2 inline comments as done. cor3ntin added inline comments. Comment at: clang/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/dtor.cpp:1 -// RUN: %clang_cc1 -std=c++2a -verify %s hubert.reinterpretcast wrote: > aaron.ballman wrote: > > I think we want

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416672. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. - Test dcl.constexpr/dtor.cpp in both C++20 and C++23 modes - Make sure j/k are actually called in constant-expression-cxx2b.cpp Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D111400: [Clang][C++2b] P2242R3: Non-literal variables [...] in constexpr

2022-03-19 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added inline comments. Comment at: clang/lib/Sema/SemaDeclCXX.cpp:1904-1906 +if (!SemaRef.LangOpts.CPlusPlus2b && +CheckLiteralType(SemaRef, Kind, VD->getLocation(), VD->getType(),

[PATCH] D121963: [clang] [OpenMP] Diagnose use of 'target_clones' in OpenMP variant declarations.

2022-03-19 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann updated this revision to Diff 416670. tahonermann added a comment. Rebase to acquire fixes from parent commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121963/new/ https://reviews.llvm.org/D121963 Files:

[PATCH] D121962: [clang] [OpenMP] Extend OpenMP variant declaration tests.

2022-03-19 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann updated this revision to Diff 416669. tahonermann added a comment. Rebase to acquire fixes from parent commits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121962/new/ https://reviews.llvm.org/D121962 Files: