[PATCH] D122110: [Clang] Set -mlinker-version explicitly in the lto test

2022-03-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D122110#3395336 , @int3 wrote: > Would it make sense to have clang pass `-object_path_lto` whenever it's > invoking LLD? It already does, see

[PATCH] D107141: [Inline-asm] Add diagnosts for unsupported inline assembly arguments

2022-03-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Ping @jyu2 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107141/new/ https://reviews.llvm.org/D107141 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D102669: [analyzer][ctu] Fix wrong 'multiple definitions' errors caused by space characters in lookup names when parsing the ctu index file

2022-03-20 Thread Ella Ma via Phabricator via cfe-commits
OikawaKirie added a comment. Herald added a project: All. Thanks, @keith. I agree with @keith to commit this patch without using on-demand-parsing through cc1. As this patch has nothing to do with the target triple issue we found. In the current version, I use the PCH file to load the external

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

2022-03-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D121271#3394108 , @iains wrote: > it looks like the test case is failing everywhere - perhaps as a result of > changes in the mangling scheme? Oh, yeah... let me try to continue the work in mangling scheme. I feel it is

[PATCH] D121097: [C++20][Modules][HU 3/5] Emit module macros for header units.

2022-03-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. In D121097#3391698 , @iains wrote: > In D121097#3391236 , @ChuanqiXu > wrote: > >> I feel good if we

[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

2022-03-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Sema/Scope.h:518 void addNRVOCandidate(VarDecl *VD) { +// every candidate except VD is "spoiled" now, remove them from the set Izaron wrote: > ChuanqiXu wrote: > > Firstly I am wondering

[PATCH] D121992: [Clang] [Driver] Add option to set alternative toolchain path

2022-03-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/include/clang/Driver/Driver.h:152 + /// Alternative toolchain path in prior to sysroot. + std::string OverlayToolChainPath; I don't understand the use of "in" in the comment. Perhaps "used" was

[PATCH] D70401: [RISCV] Complete RV32E/ilp32e implementation

2022-03-20 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added a comment. Last LLVM sync-up call @asb has raise the discussion about the ILP32E issue, so here is note from my site: RISC-V psABI doc still say "we don't guarantee the stability of `ILP32E`", the reason is RV32E still not a ratified extension, but as psABI chair, what I can

[PATCH] D122110: [Clang] Set -mlinker-version explicitly in the lto test

2022-03-20 Thread Jez Ng via Phabricator via cfe-commits
int3 added a comment. Would it make sense to have clang pass `-object_path_lto` whenever it's invoking LLD? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122110/new/ https://reviews.llvm.org/D122110

[PATCH] D122109: [CMake][Clang] Skip host link version detection for lld on Darwin

2022-03-20 Thread Jez Ng via Phabricator via cfe-commits
int3 accepted this revision. int3 added a comment. This revision is now accepted and ready to land. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122109/new/ https://reviews.llvm.org/D122109 ___

[PATCH] D122104: [X86][regcall] Support passing / returning structures

2022-03-20 Thread LuoYuanke via Phabricator via cfe-commits
LuoYuanke added inline comments. Comment at: clang/include/clang/CodeGen/CGFunctionInfo.h:744 + void setMaxVectorWidth(unsigned Width) { + MaxVectorWidth = Width ? llvm::countTrailingZeros(Width) + 1 : 0; + } Use "Log2_32()"? Repository: rG LLVM Github

[PATCH] D121627: [IROutliner][NFC] Fix typo in doc of findOrCreatePHIInBlock

2022-03-20 Thread Andrew Litteken via Phabricator via cfe-commits
AndrewLitteken accepted this revision. AndrewLitteken 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/D121627/new/ https://reviews.llvm.org/D121627

[PATCH] D122111: [clang-tidy] Fix false positives in `misc-redundant-expression` check

2022-03-20 Thread Fabian Wolff via Phabricator via cfe-commits
fwolff created this revision. fwolff added reviewers: alexfh, aaron.ballman, pavelkryukov. fwolff added a project: clang-tools-extra. Herald added subscribers: carlosgalvezp, xazax.hun. Herald added a project: All. fwolff requested review of this revision. Herald added a subscriber: cfe-commits.

[PATCH] D122110: [Clang] Set -mlinker-version explicitly in the lto test

2022-03-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: smeenai, int3, oontvoo, thakis. Herald added subscribers: ormris, steven_wu, hiraditya, inglorion. Herald added a project: All. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.

[PATCH] D122109: [CMake][Clang] Skip host link version detection for lld on Darwin

2022-03-20 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: smeenai, int3, oontvoo, thakis. Herald added a subscriber: mgorny. Herald added a project: All. phosek requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When lld is being used as host

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

2022-03-20 Thread Hubert Tong via Phabricator via cfe-commits
hubert.reinterpretcast added inline comments. Comment at: clang/test/SemaCXX/constant-expression-cxx2b.cpp:163 + +// Test whether lambda are correctly treated as implicitely constexpr under the relaxed c++23 rules. +int test_lambdas_implicitly_constexpr() { Fix

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

2022-03-20 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] D121556: [randstruct] Add randomize structure layout support

2022-03-20 Thread Bill Wendling via Phabricator via cfe-commits
void updated this revision to Diff 416808. void added a comment. Move SEED into LangOpts. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121556/new/ https://reviews.llvm.org/D121556 Files: clang/include/clang/AST/Decl.h

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

2022-03-20 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp:921 + if (IsAnd && + match(Cmp0, m_ICmp(Pred0, m_Intrinsic(m_Value(X)), + m_SpecificInt(1))) && Since the m_ICmp matches are the

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

2022-03-20 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 416803. royjacobson edited the summary of this revision. royjacobson added a comment. I noticed issue #53911 which is very similar so I fixed it as well. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D122046: [clang] Remove Address::deprecated from MveEmitter

2022-03-20 Thread Nikita Popov via Phabricator via cfe-commits
nikic added inline comments. Comment at: clang/utils/TableGen/MveEmitter.cpp:1197 +const Type *Ty = nullptr; +if (auto *DI = dyn_cast(D->getArg(0))->getOperator()) + if (auto *PTy = dyn_cast(getType(DI, Param))) Should be either `cast` or check for

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

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416793. cor3ntin added a comment. - clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst

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

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416792. cor3ntin marked 5 inline comments as done. cor3ntin added a comment. - Tidy up tests - Add comments - Add a test with a non literal variable in dependant context as per Hubert's suggestion Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D122104: [X86][regcall] Support passing / returning structures

2022-03-20 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei created this revision. pengfei added reviewers: erichkeane, craig.topper, LiuChen3, LuoYuanke. Herald added a project: All. pengfei requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Currently, the regcall calling conversion in Clang

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

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

[PATCH] D121627: [IROutliner][NFC] Fix typo in doc of findOrCreatePHIInBlock

2022-03-20 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto updated this revision to Diff 416786. hkmatsumoto added a comment. Remove trailing space as well Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121627/new/ https://reviews.llvm.org/D121627 Files:

[PATCH] D122102: [clangd] Introduce "add subclass" tweak

2022-03-20 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang added reviewers: sammccall, nridge, njames93, hokein. avogelsgesang added a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122102/new/ https://reviews.llvm.org/D122102 ___

[PATCH] D121627: [IROutliner][NFC] Fix typo in doc of findOrCreatePHIInBlock

2022-03-20 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121627/new/ https://reviews.llvm.org/D121627 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D122102: [clangd] Introduce "add subclass" tweak

2022-03-20 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang created this revision. Herald added subscribers: usaxena95, kadircet, arphaman, mgorny. Herald added a project: All. avogelsgesang requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This commit

[PATCH] D122101: [clangd] Simplify `insertDecl` and support insertion after the last declaration in a file

2022-03-20 Thread Adrian Vogelsgesang via Phabricator via cfe-commits
avogelsgesang created this revision. Herald added subscribers: usaxena95, kadircet, arphaman. Herald added a project: All. avogelsgesang requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. So far

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

2022-03-20 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto added inline comments. Comment at: llvm/test/Transforms/InstCombine/ispow2.ll:538 ; Negative test - wrong predicate (but this could reduce). xbolva00 wrote: > hkmatsumoto wrote: > > xbolva00 wrote: > > > Now reduced. > > Since this is almost the

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

2022-03-20 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto updated this revision to Diff 416763. hkmatsumoto added a comment. Address code review, removing "but this could reduce" from comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122077/new/ https://reviews.llvm.org/D122077 Files:

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

2022-03-20 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: llvm/test/Transforms/InstCombine/ispow2.ll:538 ; Negative test - wrong predicate (but this could reduce). hkmatsumoto wrote: > xbolva00 wrote: > > Now reduced. > Since this is almost the first time contributing to

[PATCH] D54943: [clang-tidy] implement const-transformation for cppcoreguidelines-const-correctness

2022-03-20 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. ping @aaron.ballman @njames93 :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D54943/new/ https://reviews.llvm.org/D54943 ___ cfe-commits mailing list

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

2022-03-20 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto added inline comments. Comment at: llvm/test/Transforms/InstCombine/ispow2.ll:538 ; Negative test - wrong predicate (but this could reduce). xbolva00 wrote: > Now reduced. Since this is almost the first time contributing to LLVM, I'm not sure

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

2022-03-20 Thread Hirochika Matsumoto via Phabricator via cfe-commits
hkmatsumoto updated this revision to Diff 416762. hkmatsumoto added a comment. Address code reviews - Fold (icmp ne ctpop(X) 1) & (icmp ne X 0) into (icmp ugt ctpop(X) 1) as well foldOrOfCtpop folds the aforementioned pattern into (icmp **uge** ctpop(X) 2) and that is later transformed into

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

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin 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 valid in a

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

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416760. cor3ntin added a comment. Add a test for evaluated labels Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111400/new/ https://reviews.llvm.org/D111400 Files: clang/docs/ReleaseNotes.rst

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

2022-03-20 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin updated this revision to Diff 416758. cor3ntin marked 2 inline comments as done. cor3ntin added a comment. - fix typos - add tests for non-literals in lambdas - run lambda tests in c++20 mode Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION