[PATCH] D120873: [clang-format] Handle wrapped else for RemoveBracesLLVM

2022-03-02 Thread Owen Pan via Phabricator via cfe-commits
owenpan created this revision. owenpan added reviewers: MyDeveloperDay, curdeius, HazardyKnusperkeks. owenpan added a project: clang-format. Herald added a project: All. owenpan requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Removes the ne

[PATCH] D120870: [RISCV][NFC] Refine and refactor RISCVVEmitter and riscv_vector.td.

2022-03-02 Thread Roger Ferrer Ibanez via Phabricator via cfe-commits
rogfer01 accepted this revision. rogfer01 added a comment. This revision is now accepted and ready to land. Thanks for the cleanup @khchen ! LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120870/new/ https://reviews.llvm.org/D120870

[PATCH] D120870: [RISCV][NFC] Refine and refactor RISCVVEmitter and riscv_vector.td.

2022-03-02 Thread Zakk Chen via Phabricator via cfe-commits
khchen created this revision. khchen added reviewers: craig.topper, rogfer01, kito-cheng, arcbbb, monkchiang, eopXD. Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewe

[PATCH] D120864: [AArch64] Avoid scanning feature list for target parsing

2022-03-02 Thread Son Tuan Vu via Phabricator via cfe-commits
tyb0807 updated this revision to Diff 412592. tyb0807 added a comment. Update logic to define crypto extensions, strictly following the old implementation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120864/new/ https://reviews.llvm.org/D120864

[PATCH] D120639: [RISCV] Pass -mno-relax to assembler when -fno-integrated-as specified

2022-03-02 Thread Kito Cheng via Phabricator via cfe-commits
kito-cheng added inline comments. Comment at: clang/test/Driver/riscv-gnutools.c:19 +// Check default when -mno-relax and -fno-integrated-as specified +// RUN: %clang -target riscv32 --gcc-toolchain=%S/Inputs/basic_riscv32_tree -mno-relax -fno-integrated-as %s -### -c \ --

[PATCH] D120864: [AArch64] Avoid scanning feature list for target parsing

2022-03-02 Thread Son Tuan Vu via Phabricator via cfe-commits
tyb0807 created this revision. tyb0807 added reviewers: tmatheson, nickdesaulniers, chill. Herald added a subscriber: kristof.beyls. Herald added a project: All. tyb0807 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. As discussed in https:

[PATCH] D120862: Sema: Allow scoped enums as source type for integral conversion.

2022-03-02 Thread Peter Collingbourne via Phabricator via cfe-commits
pcc created this revision. pcc added a reviewer: rsmith. Herald added a project: All. pcc requested review of this revision. Herald added a project: clang. Fixes pr54158. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120862 Files: clang/lib/Sema/SemaOverload.cpp clang/tes

[PATCH] D120856: [NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in CGBlocks.cpp

2022-03-02 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall 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/D120856/new/ https://reviews.llvm.org/D120856 ___

[PATCH] D120395: [X86] Prohibit arithmetic operations on type `__bfloat16`

2022-03-02 Thread Andy Kaylor via Phabricator via cfe-commits
andrew.w.kaylor added a comment. Herald added a project: All. In D120395#3346591 , @scanon wrote: > There's a lot of churn around proposed "solutions" on this and related PR, > but not a very clear analysis of what the problem we're trying to solve is.

[PATCH] D116015: [PowerPC] Add generic fnmsub intrinsic

2022-03-02 Thread ChenZheng via Phabricator via cfe-commits
shchenz accepted this revision as: shchenz. shchenz added a comment. This revision is now accepted and ready to land. Herald added a project: All. LGTM. Two nits about the comments and tests. Please wait for some days in case other reviews have some comments. Comment at: clang

[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 Thread Phoebe Wang via Phabricator via cfe-commits
pengfei added a comment. Sorry, I missed this patch. I think this is a wrong fix. The `buf[9]` doesn't make sense to X86 registers. You can see GCC fails with it too. https://godbolt.org/z/vPcfoG714 I think we just need to do sema check for it to emit error gracefully. BTW, I have a patch D107

[PATCH] D120857: WIP [randstruct] Create basis for unit test module

2022-03-02 Thread Bill Wendling via Phabricator via cfe-commits
void created this revision. Herald added subscribers: dang, jdoerfert, mgorny. Herald added a reviewer: aaron.ballman. Herald added a project: All. void requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Build the unit tests with (in the build

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. Frankly speaking, this is really a randomly written patch, and I have never thought it would raise so much concern. But I believe I can handle it if you guys can give me some trust and little guidance! <3 In D119609#3355409 , @a

[PATCH] D120856: [NFC][Clang][OpaquePtr] Remove calls to Address::deprecated in CGBlocks.cpp

2022-03-02 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak created this revision. ahatanak added reviewers: opaque-pointers, rjmccall. ahatanak added a project: clang. Herald added a project: All. ahatanak requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D120856 Files: clang/lib/CodeGen/CGBlock

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-02 Thread Jun Zhang via Phabricator via cfe-commits
junaire added a comment. In D119609#3355368 , @erichkeane wrote: > Does this break a case like this? https://godbolt.org/z/Tc9Ko7hWY No, after applying the patch, clang accepts the code just like gcc > it seems the problem is with the Expression statem

[PATCH] D120255: [Concepts] Check constraints for explicit template instantiations

2022-03-02 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson updated this revision to Diff 412557. royjacobson added a comment. Thanks for the quick feedback :) I looked again at the AST and found out that there is a difference between instantiated and non-instantiated functions I missed - the instantiated functions have actual code AST. I ha

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread 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 rG840695814ae3: [AMDGPU] Add gfx1036 target (authored by Aakanksha ). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[clang] 8406958 - [AMDGPU] Add gfx1036 target

2022-03-02 Thread via cfe-commits
Author: Aakanksha Date: 2022-03-02T23:26:38Z New Revision: 840695814ae3e945dcc8c2e649929afeb8b629c1 URL: https://github.com/llvm/llvm-project/commit/840695814ae3e945dcc8c2e649929afeb8b629c1 DIFF: https://github.com/llvm/llvm-project/commit/840695814ae3e945dcc8c2e649929afeb8b629c1.diff LOG: [AM

[PATCH] D114425: [clang] Add __builtin_bswap128

2022-03-02 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. Herald added a project: All. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114425/new/ https://reviews.llvm.org/D114425 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[PATCH] D120449: [RISCV][RVV] Add strict vfcvt intrinsics that have side effects for dynamically-set rounding mode

2022-03-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:4671 + if (HasMask) { +for (size_t i = 2; i < NumOperands; i++) { + Ops.push_back(Op.getOperand(i)); Drop curly braces Comment at: llvm/lib/Ta

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec accepted this revision. rampitec 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/D120846/new/ https://reviews.llvm.org/D120846 ___

[PATCH] D116385: [clangd] Code action for creating an ObjC initializer

2022-03-02 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. Herald added a project: All. friendly ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116385/new/ https://reviews.llvm.org/D116385 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread Aakanksha Patil via Phabricator via cfe-commits
aakanksha555 updated this revision to Diff 412554. aakanksha555 added a comment. Rebase patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120846/new/ https://reviews.llvm.org/D120846 Files: clang/include/clang/Basic/Cuda.h clang/lib/Basic/Cu

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread Aakanksha Patil via Phabricator via cfe-commits
aakanksha555 updated this revision to Diff 412547. aakanksha555 added a comment. Herald added a subscriber: mgorny. Update openmp/libomptarget/DeviceRTL/CMakeLists.txt as well. clang/test/Driver/cuda-bad-arch.cu to be updated with all gfx10 targets in a separate patch. Repository: rG LLVM Git

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. Looks like cuda-bad-arch.cu does not have any gfx10. Let's fix this in a separate followup patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120846/new/ https://reviews.llvm.org/D120846 ___

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. You also need to rebase it, I have just landed gfx940 target. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120846/new/ https://reviews.llvm.org/D120846 ___ cfe-commits mailing

[PATCH] D112774: [RISCV] Support k-ext clang intrinsics

2022-03-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Herald added a project: All. Comment at: clang/include/clang/Basic/BuiltinsRISCV.def:75 +// Zbkb extension +TARGET_BUILTIN(__builtin_riscv_brev8, "ZiZi", "nc", "zbkb") +TARGET_BUILTIN(__builtin_riscv_zip, "ZiZi", "nc", "zbkb")

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread Stanislav Mekhanoshin via Phabricator via cfe-commits
rampitec added a comment. Please also update these 2 files: clang/test/Driver/cuda-bad-arch.cu openmp/libomptarget/DeviceRTL/CMakeLists.txt In fact the last one was not updated before too, so the last target gfx1031 there. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

[PATCH] D120846: [AMDGPU] Add gfx1036 target

2022-03-02 Thread Aakanksha Patil via Phabricator via cfe-commits
aakanksha555 created this revision. aakanksha555 added reviewers: rampitec, msearles, kzhuravl. Herald added subscribers: asavonic, foad, dexonsmith, kerbowa, rupprecht, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, emaste, arsenm, jholewinski. Herald added a reviewer: jhenderson.

[PATCH] D120688: [AMDGPU] Add gfx940 target

2022-03-02 Thread Stanislav Mekhanoshin 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 rG2e2e64df4a4f: [AMDGPU] Add gfx940 target (authored by rampitec). Herald added projects: clang, OpenMP. Herald added subscribers: openmp-commits, cfe-

[clang] 2e2e64d - [AMDGPU] Add gfx940 target

2022-03-02 Thread Stanislav Mekhanoshin via cfe-commits
Author: Stanislav Mekhanoshin Date: 2022-03-02T13:54:48-08:00 New Revision: 2e2e64df4a4f6580499fa09c3c16d5c39d9dd4cb URL: https://github.com/llvm/llvm-project/commit/2e2e64df4a4f6580499fa09c3c16d5c39d9dd4cb DIFF: https://github.com/llvm/llvm-project/commit/2e2e64df4a4f6580499fa09c3c16d5c39d9dd4

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Another example that is... concerning: https://godbolt.org/z/84b8Yb7ne template void call_lambda(T&& L) { L(); } int g() { auto x = [](char c = ({return 5;'c';})){}; call_lambda(x); return 0; } int main() { return g(); } I filed a bug against GCC

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Thank you for looking into this! I'm not certain this is the correct approach, however. The comment on the function is: /// ActOnCapScopeReturnStmt - Utility routine to type-check return statements /// for capturing scopes. however, there's not a capture scope

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-03-02 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin added inline comments. Comment at: clang/test/Driver/aix-ld.c:609 +// Check powerpc-ibm-aix7.1.0.0, 32-bit. -shared (with exp option strings in other opt). +// RUN: %clangxx -x c++ -no-canonical-prefixes %s 2>&1 -### \ +// RUN:-resource-dir=%S/Inputs/resource_d

[PATCH] D119147: [AIX][clang][driver] Check the command string to the linker for exportlist opts

2022-03-02 Thread Digger Lin via Phabricator via cfe-commits
DiggerLin updated this revision to Diff 412516. DiggerLin marked an inline comment as done. Herald added a project: All. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119147/new/ https://reviews.llvm.org/D119147 Files: clang/include/clang/Driver/J

[PATCH] D119609: [Clang][Sema] Don't act on ReturnStmt when parsing the lambda declarator.

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Herald added a project: All. Does this break a case like this? https://godbolt.org/z/Tc9Ko7hWY it seems the problem is with the Expression statements, and I'm not sure why we are doing "ActOnCapScopeReturnStmt" when we aren't really in a capture scope anymore, right?

[PATCH] D23934: Add a -ffixed-date-time= flag that sets the initial value of __DATE__, __TIME__, __TIMESTAMP__

2022-03-02 Thread Ed Maste via Phabricator via cfe-commits
emaste added a comment. Herald added a project: All. The original author appears to have given up on it. Someone will need to rebase and work on pushing it forward CHANGES SINCE LAST ACTION https://reviews.llvm.org/D23934/new/ https://reviews.llvm.org/D23934

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane accepted this revision. erichkeane added a comment. This revision is now accepted and ready to land. Would love someone to check out the APInt changes to confirm it is 'doing the right thing', but as far as I can tell it is right (and I'm just not confident enough to say so :D). CHA

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:1156 + if (const auto *BT = Node->getType()->getAs()) { +OS << (isSigned ? "wb" : "uwb"); erichkeane wrote: > You don't need BT here anymore (sorry for missing that!). No worrie

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 412509. aaron.ballman marked 4 inline comments as done. aaron.ballman added a comment. getAs -> isa CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120770/new/ https://reviews.llvm.org/D120770 Files: clang/docs/ReleaseNotes.rst clang/includ

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:1156 + if (const auto *BT = Node->getType()->getAs()) { +OS << (isSigned ? "wb" : "uwb"); You don't need BT here anymore (sorry for missing that!). CHANGES SINCE LAST ACTION ht

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman marked 5 inline comments as done. aaron.ballman added inline comments. Comment at: clang/lib/AST/StmtPrinter.cpp:1157 + if (const auto *BT = Node->getType()->getAs()) { +OS << (BT->isUnsigned() ? "uwb" : "wb"); +return; erichkeane wrote: >

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 412507. aaron.ballman added a comment. Correct a think-o that fixes a failing test. Also removed a newline that didn't need to exist. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120770/new/ https://reviews.llvm.org/D120770 Files: clang/d

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/Lex/LiteralSupport.h:65 bool isLong : 1; // This is *not* set for long long. bool isLongLong : 1; bool isSizeT : 1; // 1z, 1uz (C++2b) aaron.ballman wrote: > erichkeane wr

[PATCH] D120774: [clang-format] Handle builtins in constraint expression

2022-03-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/unittests/Format/FormatTest.cpp:23747 + verifyFormat("template \n" + "concept integral = __is_integral(T);"); + curdeius wrote: > curdeius wrote: > > How about other kinds? > > This doesn'

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Lex/LiteralSupport.h:65 bool isLong : 1; // This is *not* set for long long. bool isLongLong : 1; bool isSizeT : 1; // 1z, 1uz (C++2b) erichkeane wrote: > I can't help

[PATCH] D120770: [C2x] Implement literal suffixes for _BitInt

2022-03-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman updated this revision to Diff 412502. aaron.ballman marked 3 inline comments as done. aaron.ballman added a comment. Address review comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120770/new/ https://reviews.llvm.org/D120770 Files: clang/docs/ReleaseNotes.rst

[PATCH] D120255: [Concepts] Check constraints for explicit template instantiations

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/SemaTemplate/constraints-instantiation.cpp:3-8 +// void PR46029::A<1>::f() +// CHECK: define {{.*}} @_ZN7PR460291AILi1EE1fEv +// void PR46029::A<2>::f() +// CHECK: define {{.*}} @_ZN7PR460291AILi2EE1fEv +// void PR46029::A<

[PATCH] D120255: [Concepts] Check constraints for explicit template instantiations

2022-03-02 Thread Roy Jacobson via Phabricator via cfe-commits
royjacobson added inline comments. Comment at: clang/test/SemaTemplate/constraints-instantiation.cpp:3-8 +// void PR46029::A<1>::f() +// CHECK: define {{.*}} @_ZN7PR460291AILi1EE1fEv +// void PR46029::A<2>::f() +// CHECK: define {{.*}} @_ZN7PR460291AILi2EE1fEv +// void PR46029::A

[PATCH] D117887: [NVPTX] Expose float tys min, max, abs, neg as builtins

2022-03-02 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D117887#3353653 , @jchlanda wrote: > I went with the web interface as described here: > https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface > > with `git diff -U99 ...` didn't want to bite the bu

[PATCH] D93298: [RISCV] add the MC layer support of Zfinx extension

2022-03-02 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Never mind, I see you added a test for that case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93298/new/ https://reviews.llvm.org/D93298 ___ cfe-commits mailing list cfe-commits@

[PATCH] D93298: [RISCV] add the MC layer support of Zfinx extension

2022-03-02 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Does a double with `r` for RV32 work with that fix? That's supposed to give the low half of the register. You might need to also deal with the register pair class? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93298/new/ h

[PATCH] D120398: [format] follow up: Use unsigned char as the base of all enums in FormatStyle

2022-03-02 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D120398#3353053 , @owenpan wrote: > Can we use `int8_t` instead of `unsigned char` to keep the enum types signed > (and update the changes made in D93758 )? +1 Repository: rG LL

[PATCH] D93298: [RISCV] add the MC layer support of Zfinx extension

2022-03-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D93298#3355088 , @craig.topper wrote: > In D93298#3354313 , @krasimir wrote: > >> @achieveartificialintelligence thank you for looking into this, sorry for >> the late reply! >> >>

Re: [PATCH] D96109: Refactor implementation of -funique-internal-linkage-names.

2022-03-02 Thread Sriraman Tallam via cfe-commits
On Wed, Mar 2, 2022 at 11:08 AM Ellis Hoag via Phabricator < revi...@reviews.llvm.org> wrote: > ellis added a comment. > Herald added a subscriber: ormris. > Herald added a project: All. > > Hi @tmsriram. I found a clang crash when using the flag > `-funique-internal-linkage-names` that only happe

[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 Thread Fangrui Song 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 rGf76d3b800f73: [clang][CGStmt] fix crash on invalid asm statement (authored by ztong0001, committed by MaskRay). Changed prior to commit: https://r

[clang] f76d3b8 - [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 Thread Fangrui Song via cfe-commits
Author: Tong Zhang Date: 2022-03-02T11:18:55-08:00 New Revision: f76d3b800f7341882ea93db47cc8f28d94e74f1c URL: https://github.com/llvm/llvm-project/commit/f76d3b800f7341882ea93db47cc8f28d94e74f1c DIFF: https://github.com/llvm/llvm-project/commit/f76d3b800f7341882ea93db47cc8f28d94e74f1c.diff LO

[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 Thread Tong Zhang via Phabricator via cfe-commits
ztong0001 added a comment. Hi Fangrui @MaskRay, Thanks for your review. Could you please also help me landing it since I don't have write permission to the repo. Please use Tong Zhang Thanks and have a good one! - Tong Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 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. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120596/new/ https://reviews.llvm.org/D120596 __

[PATCH] D96109: Refactor implementation of -funique-internal-linkage-names.

2022-03-02 Thread Ellis Hoag via Phabricator via cfe-commits
ellis added a comment. Herald added a subscriber: ormris. Herald added a project: All. Hi @tmsriram. I found a clang crash when using the flag `-funique-internal-linkage-names` that only happens after this diff. Would you mind taking a look? $ cat test.c inline void foo() {} extern void f

[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 Thread Tong Zhang via Phabricator via cfe-commits
ztong0001 added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2517 +else if (OutputTy->isFloatingPointTy()) Arg = Builder.CreateFPExt(Arg, OutputTy); } MaskRay wrote: > Shall we keep the assert (in a new `else` branch) just i

[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement

2022-03-02 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/CodeGen/CGStmt.cpp:2517 +else if (OutputTy->isFloatingPointTy()) Arg = Builder.CreateFPExt(Arg, OutputTy); } Shall we keep the assert (in a new `else` branch) just in case there are ot

[PATCH] D93298: [RISCV] add the MC layer support of Zfinx extension

2022-03-02 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. In D93298#3354313 , @krasimir wrote: > @achieveartificialintelligence thank you for looking into this, sorry for the > late reply! > > It looks like the latest version addresses @nikic's IR reproducer with > `-mtriple=riscv3

[PATCH] D118350: [Clang][Sema][AIX][PowerPC] Emit byval alignment warning only when struct is passed to a function

2022-03-02 Thread Sean Fertile via Phabricator via cfe-commits
sfertile added inline comments. Herald added a project: All. Comment at: clang/lib/Sema/SemaChecking.cpp:5246 + + if (const auto *ICE = dyn_cast(Arg->IgnoreParens())) { +if (const auto *DR = dyn_cast(ICE->getSubExpr())) { Nit: To avoid the deep nesting, can

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Yup, land it! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120489/new/ https://reviews.llvm.org/D120489 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added a comment. @steakhal , if everything looks fine, can i land this ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120489/new/ https://reviews.llvm.org/D120489 ___ cfe-commits mailing lis

[clang] 3f7c3ff - [OpenMP] Handle sysroot option in offloading linker wrapper

2022-03-02 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2022-03-02T13:02:41-05:00 New Revision: 3f7c3ff90e33393b7b8a0851f6056ec1d9c164af URL: https://github.com/llvm/llvm-project/commit/3f7c3ff90e33393b7b8a0851f6056ec1d9c164af DIFF: https://github.com/llvm/llvm-project/commit/3f7c3ff90e33393b7b8a0851f6056ec1d9c164af.diff

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added inline comments. Comment at: clang/test/Analysis/bstring_UninitRead.c:2 +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=alpha.unix.cstring + steakhal wrote: > Yeah done! Thanks Repository: rG LLVM Github Monorepo CHANG

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets updated this revision to Diff 412464. phyBrackets added a comment. enabled the core checker Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120489/new/ https://reviews.llvm.org/D120489 Files: clang/docs/analyzer/checkers.rst clang/in

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal accepted this revision. steakhal added a comment. The `core` checkers should be always enabled. Comment at: clang/test/Analysis/bstring_UninitRead.c:2 +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=alpha.unix.cstring + Reposito

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets updated this revision to Diff 412452. phyBrackets added a comment. Remove unneccesary RUN and some macros definitions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120489/new/ https://reviews.llvm.org/D120489 Files: clang/docs/analyz

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added inline comments. Comment at: clang/test/Analysis/bstring_UninitRead.c:67-85 +//===--=== +// mempcpy() +//===--=== + +#ifdef VA

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/test/Analysis/bstring_UninitRead.c:1-84 +// RUN: %clang_analyze_cc1 -verify %s \ +// RUN: -analyzer-checker=core \ +// RUN: -analyzer-checker=unix.cstring \ +// RUN: -analyzer-checker=alpha.unix.cstring \ +// RUN: -analyze

[PATCH] D120757: [NFC][Clang][OpaquePtr] Remove the call to Address::deprecated in CreatePointerBitCastOrAddrSpaceCast

2022-03-02 Thread Akira Hatanaka via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd112cc27569b: [NFC][Clang][OpaquePtr] Remove the call to Address::deprecated in (authored by ahatanak). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120757/

[clang] d112cc2 - [NFC][Clang][OpaquePtr] Remove the call to Address::deprecated in

2022-03-02 Thread Akira Hatanaka via cfe-commits
Author: Akira Hatanaka Date: 2022-03-02T08:58:00-08:00 New Revision: d112cc27569b8329b4c9090265b809d459a4a5a8 URL: https://github.com/llvm/llvm-project/commit/d112cc27569b8329b4c9090265b809d459a4a5a8 DIFF: https://github.com/llvm/llvm-project/commit/d112cc27569b8329b4c9090265b809d459a4a5a8.diff

[PATCH] D120710: [clang-format] QualifierOrder does not reorder template arguments

2022-03-02 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added inline comments. Herald added a project: All. Comment at: clang/unittests/Format/QualifierFixerTest.cpp:910 + Style); + verifyFormat("TemplateType t;", "TemplateType t;", Style); +} HazardyKnusperkeks wrote: > As far as I understand

[PATCH] D53847: [C++2a] P0634r3: Down with typename!

2022-03-02 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Herald added a project: All. In D53847#3252460 , @cjdb wrote: > What's the status of this patch? It appears to me that the 'delta' right now is a couple of cases where this patch doesn't properly diagnose/warn (see the convo i

[PATCH] D120806: [clang-format] Recognize "if consteval".

2022-03-02 Thread Marek Kurdej via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG13351fdf8cb4: [clang-format] Recognize "if consteval". (authored by curdeius). Changed prior to commit: https://reviews.llvm.org/D120806?vs=412366&id=412444#toc Repository: rG LLVM Github Monorepo C

[clang] 13351fd - [clang-format] Recognize "if consteval".

2022-03-02 Thread Marek Kurdej via cfe-commits
Author: Marek Kurdej Date: 2022-03-02T17:46:45+01:00 New Revision: 13351fdf8cb448ffd60727f031df0d7cb348e48a URL: https://github.com/llvm/llvm-project/commit/13351fdf8cb448ffd60727f031df0d7cb348e48a DIFF: https://github.com/llvm/llvm-project/commit/13351fdf8cb448ffd60727f031df0d7cb348e48a.diff

[PATCH] D120806: [clang-format] Recognize "if consteval".

2022-03-02 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius added a comment. Great, I'll add a few test cases when landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120806/new/ https://reviews.llvm.org/D120806 ___ cfe-commits mailing list cfe-commit

[PATCH] D120824: [clang][ASTImporter] Fix a bug when importing CXXDefaultInitExpr.

2022-03-02 Thread Balázs Kéri via Phabricator via cfe-commits
balazske created this revision. Herald added subscribers: steakhal, martong, gamesh411, Szelethus, dkrupp. Herald added a reviewer: a.sidorin. Herald added a reviewer: shafik. Herald added a reviewer: Szelethus. Herald added a project: All. balazske requested review of this revision. Herald added a

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added inline comments. Comment at: clang/test/Analysis/bstring_UninitRead.c:67-85 +//===--=== +// mempcpy() +//===--=== + +#ifdef VA

[PATCH] D120806: [clang-format] Recognize "if consteval".

2022-03-02 Thread Johel Ernesto Guerrero Peña via Phabricator via cfe-commits
JohelEGP accepted this revision. JohelEGP added a comment. My few cases format consistently with the condition case: diff diff --git a/tests/integration/test.waarudo.io.dynamic.cpp b/tests/integration/test.waarudo.io.dynamic.cpp index be5a626..e1265b9 100644 --- a/tests/integration/test.

[PATCH] D120360: [libTooling] Generalize string explanation as Any metadata

2022-03-02 Thread Yitzhak Mandelbaum via Phabricator via cfe-commits
ymandel accepted this revision. ymandel added a comment. This revision is now accepted and ready to land. Looks really good! Comment at: clang/include/clang/Tooling/Transformer/RewriteRule.h:64 using TextGenerator = std::shared_ptr>; (and move down to afte

[clang] ca94f28 - [clang] ExprEngine::VisitCXXNewExpr - remove superfluous nullptr tests

2022-03-02 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2022-03-02T15:59:10Z New Revision: ca94f28d15d53bb77ad347d6e374486475f86121 URL: https://github.com/llvm/llvm-project/commit/ca94f28d15d53bb77ad347d6e374486475f86121 DIFF: https://github.com/llvm/llvm-project/commit/ca94f28d15d53bb77ad347d6e374486475f86121.diff LOG:

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Please mark the done comments as "done" with the corresponding button prior to submitting an update. Comment at: clang/test/Analysis/bstring_UninitRead.c:67-85 +//===--=== +// mempcpy

[PATCH] D120814: [clang-tidy] Add check to perfer pre-increment over post-increment

2022-03-02 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik created this revision. philnik added reviewers: aaron.ballman, JonasToth. Herald added subscribers: carlosgalvezp, xazax.hun, mgorny. Herald added a project: All. philnik requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. R

[PATCH] D120474: [clang][deps] Remove '-fmodules-cache-path=' arguments

2022-03-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp:36 + llvm::erase_if(Args, [](const std::string &Arg) { +return Arg.find("-fmodules-cache-path=") == 0; + }); dexonsmith wrote: > Is that the only

[PATCH] D120793: [NFC] [C++20] [Modules] Simplify ActOnModuleImport by merging Path and Parition

2022-03-02 Thread Chuanqi Xu 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 rG3eb2da76d770: [NFC] [C++20] [Modules] Simplify ActOnModuleImport by merging Path and Parition (authored by ChuanqiXu). Repository: rG LLVM Github

[clang] 3eb2da7 - [NFC] [C++20] [Modules] Simplify ActOnModuleImport by merging Path and Parition

2022-03-02 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2022-03-02T23:06:36+08:00 New Revision: 3eb2da76d77044802135350668da16d433a7c7b6 URL: https://github.com/llvm/llvm-project/commit/3eb2da76d77044802135350668da16d433a7c7b6 DIFF: https://github.com/llvm/llvm-project/commit/3eb2da76d77044802135350668da16d433a7c7b6.diff LO

[PATCH] D93298: [RISCV] add the MC layer support of Zfinx extension

2022-03-02 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. @achieveartificialintelligence thank you for looking into this, sorry for the late reply! It looks like the latest version addresses @nikic's IR reproducer with `-mtriple=riscv32`. There seems to be an error trying this out with `-mtriple=riscv64`: % cat test.ll

[PATCH] D120812: [AST] Use RecoveryExpr to model a DeclRefExpr which refers to an invalid Decl.

2022-03-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. Very nice! I thought we had considered and rejected this in the past, but I think it was rather allowing lookup to find invalid decls in cases where it doesn't today.

[PATCH] D120793: [NFC] [C++20] [Modules] Simplify ActOnModuleImport by merging Path and Parition

2022-03-02 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaModule.cpp:415 + return ActOnModuleImport(StartLoc, ExportLoc, ImportLoc, Mod, Path); } iains wrote: > it looks like there is an extra blank line before the closing brace.. No, it isn't. It shows

[PATCH] D120793: [NFC] [C++20] [Modules] Simplify ActOnModuleImport by merging Path and Parition

2022-03-02 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 412404. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120793/new/ https://reviews.llvm.org/D120793 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/Parser.cpp clang/lib/Sema/SemaModule.cpp

[PATCH] D120465: [clang][deps] Generate necessary "-fmodule-map-file=" arguments, disable implicit module maps

2022-03-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp:112 void dependencies::detail::collectPCMAndModuleMapPaths( llvm::ArrayRef Modules, dexonsmith wrote: > Should this be renamed? Yes, that would mak

[PATCH] D120464: [clang][modules] Report module maps affecting `no_undeclared_includes` modules

2022-03-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/test/Modules/add-remove-irrelevant-module-map.m:36-38 +#if __has_include("d.h") // This should use 'd.modulemap' in order to determine that 'd.h' + // doesn't exist for 'c' because of its '[no_undecla

[PATCH] D120812: [AST] Use RecoveryExpr to model a DeclRefExpr which refers to an invalid Decl.

2022-03-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/test/SemaCXX/copy-assignment.cpp:117 A(UndeclaredType n) : X(n) {} // expected-error {{unknown type name 'UndeclaredType'}} +// expected-error@-1 {{member initializer 'X' does not name a non-static data member or base cla

[PATCH] D120812: [AST] Use RecoveryExpr to model a DeclRefExpr which refers to an invalid Decl.

2022-03-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Previously, we didin't build a DeclRefExpr which refers to an invalid declaration. In this patch, we handle this case by buildin

[PATCH] D120331: [clang-tidy][run-clang-tidy.py] Add --config-file= option

2022-03-02 Thread Shreyas via Phabricator via cfe-commits
SAtacker updated this revision to Diff 412397. SAtacker added a comment. [clang-tidy][run-clang-tidy.py] Rename `group` to `config_group` Signed-off-by: Shreyas Atre Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120331/new/ https://reviews.llvm.o

[PATCH] D120489: [analyzer] Done some changes to detect Uninitialized read by the char array manipulation functions

2022-03-02 Thread Shivam Rajput via Phabricator via cfe-commits
phyBrackets added a comment. Hey @NoQ and @steakhal , will you just check , if everything looks fine or not! The test cases run successfully tho now! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120489/new/ https://reviews.llvm.org/D120489 _

  1   2   >