[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Dave Green via Phabricator via cfe-commits
dmgreen added a comment. Hello, I also noticed this potentially causing problems for scalable vectors: https://godbolt.org/z/qdr8P86aW That probably counts as one of the "edge cases for things we hadn't accounted for". Thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION ht

[PATCH] D148901: [clang][Interp] Fix post-inc/dec operator result

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, taramana, erichkeane, shafik. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. We pushed the wrong value on the stack, always leavi

[PATCH] D147844: Emit warning when implicit cast from int to bool happens in an conditional operator expression

2023-04-21 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
chaitanyav added a comment. @aaron.ballman please take a look. I filed a issue that premerge checks are not working on AIX https://github.com/google/llvm-premerge-checks/issues/441 Not sure why the TSAN, MSAN and ASAN checks are failing on libcxx Repository: rG LLVM Github Monorepo CHANGES

[clang] 0ba922f - Revert "Reapply D146987 "[Assignment Tracking] Enable by default""

2023-04-21 Thread Carlos Alberto Enciso via cfe-commits
Author: Carlos Alberto Enciso Date: 2023-04-21T09:11:40+01:00 New Revision: 0ba922f600469df273c753f873668e41025487c0 URL: https://github.com/llvm/llvm-project/commit/0ba922f600469df273c753f873668e41025487c0 DIFF: https://github.com/llvm/llvm-project/commit/0ba922f600469df273c753f873668e41025487

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. I'm also running into issues due to this commit. Unfortunately, the issues don't seem to be entirely deterministic. They can be reproduced with https://martin.st/temp/python-preproc.c: $ clang -target i686-w64-mingw32 -c -g -O3 python-preproc.c Assertion failed: (!

[PATCH] D144269: [Analyzer] Show "taint originated here" note of alpha.security.taint.TaintPropagation checker at the correct place

2023-04-21 Thread Daniel Krupp via Phabricator via cfe-commits
dkrupp marked an inline comment as done. dkrupp added a comment. @steakhal is there anything else to do before we merge this? Thanks. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144269/new/ https://reviews.llvm.org/D144269 ___ cfe-commits m

[PATCH] D147591: [clang][Interp] Handle CXXTemporaryObjectExprs

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147591/new/ https://reviews.llvm.org/D147591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D146030: [clang][Interp] Handle LambdaExprs

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146030/new/ https://reviews.llvm.org/D146030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D147844: Emit warning when implicit cast from int to bool happens in an conditional operator expression

2023-04-21 Thread Nikolas Klauser via Phabricator via cfe-commits
philnik added a comment. I have to say I'm not really convinced this change is a good idea. The cases it flags don't really seem in any way ambiguous/erroneous. In D147844#4286364 , @chaitanyav wrote: > @aaron.ballman please take a look. > > I filed a

[PATCH] D148908: [Driver][NFC] Simplify code.

2023-04-21 Thread Jianjian Guan via Phabricator via cfe-commits
jacquesguan created this revision. Herald added a project: All. jacquesguan requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D148908 Files: clang/lib/Driver/Driver.cp

[PATCH] D144943: [clang][Interp] Implement bitcasts (WIP)

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 515659. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144943/new/ https://reviews.llvm.org/D144943 Files: clang/lib/AST/Interp/Boolean.h clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Desc

[PATCH] D147840: [clang][Interp] Handle DiscardResult for DeclRef- and ParenExprs

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 515660. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147840/new/ https://reviews.llvm.org/D147840 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AST/Interp/literals.cpp

[PATCH] D144164: [clang][Interp] Handle PtrMemOps

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144164/new/ https://reviews.llvm.org/D144164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D143334: [clang][Interp] Fix diagnosing uninitialized ctor record arrays

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143334/new/ https://reviews.llvm.org/D143334 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D144457: [clang][Interp] Handle global composite temporaries

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144457/new/ https://reviews.llvm.org/D144457 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D142630: [clang][Interp] Implement virtual function calls

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142630/new/ https://reviews.llvm.org/D142630 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[PATCH] D148596: [KMSAN] Enable on SystemZ

2023-04-21 Thread Ilya Leoshkevich via Phabricator via cfe-commits
iii updated this revision to Diff 515661. iii added a comment. - (unsigned)0 -> 0u (0 doesn't work, because the overload becomes ambiguous). - Improve matching in the testcase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148596/new/ https://revie

[PATCH] D148908: [Driver][NFC] Simplify code.

2023-04-21 Thread Ben Shi via Phabricator via cfe-commits
benshi001 accepted this revision. benshi001 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/D148908/new/ https://reviews.llvm.org/D148908 _

[PATCH] D148914: [Sema][NFC] add check before using `BuildExpressionFromIntegralTemplateArgument`

2023-04-21 Thread Congcong Cai via Phabricator via cfe-commits
HerrCai0907 created this revision. Herald added a project: All. HerrCai0907 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch wants to avoid Sema crash for inline friend decl like template int foo(F1 X); template struct A {

[PATCH] D148783: [clangd] Add support TextDocumentEdit.

2023-04-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 515671. hokein marked 2 inline comments as done. hokein added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148783/new/ https://reviews.llvm.org/D148783 Files: clang-tools-e

[PATCH] D148783: [clangd] Add support TextDocumentEdit.

2023-04-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. > can you also have a version of the > clang-tools-extra/clangd/test/fixits-command.test with documentChanges > support? it's unlikely to have clients in that configuration but i believe > the deserialization issue i mentioned above would be discoverable by such a > tes

[clang] 22a408a - [Pipelines] Don't explicitly require ORE

2023-04-21 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2023-04-21T13:22:04+02:00 New Revision: 22a408ae513c753f0b6a7a9b55fedf8fd735f1b1 URL: https://github.com/llvm/llvm-project/commit/22a408ae513c753f0b6a7a9b55fedf8fd735f1b1 DIFF: https://github.com/llvm/llvm-project/commit/22a408ae513c753f0b6a7a9b55fedf8fd735f1b1.diff

[clang] 7c00219 - [clang] trigger -Wcast-qual on functional casts

2023-04-21 Thread Aaron Ballman via cfe-commits
Author: Jorge Pinto Sousa Date: 2023-04-21T07:45:05-04:00 New Revision: 7c0021923503a9a5fe1ba1f0b778b5b83c42aa43 URL: https://github.com/llvm/llvm-project/commit/7c0021923503a9a5fe1ba1f0b778b5b83c42aa43 DIFF: https://github.com/llvm/llvm-project/commit/7c0021923503a9a5fe1ba1f0b778b5b83c42aa43.d

[PATCH] D148276: [clang] trigger -Wcast-qual on functional casts

2023-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c0021923503: [clang] trigger -Wcast-qual on functional casts (authored by sousajo, committed by aaron.ballman). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed prior to com

[clang] 9e9e096 - [clang-format] Fix dropped 'else'.

2023-04-21 Thread Manuel Klimek via cfe-commits
Author: Manuel Klimek Date: 2023-04-21T11:59:45Z New Revision: 9e9e096ae95b9a41bf855cda01963a65313e9560 URL: https://github.com/llvm/llvm-project/commit/9e9e096ae95b9a41bf855cda01963a65313e9560 DIFF: https://github.com/llvm/llvm-project/commit/9e9e096ae95b9a41bf855cda01963a65313e9560.diff LOG:

[PATCH] D146310: [clang-format] Fix dropped 'else' in 398cddf6acec

2023-04-21 Thread Manuel Klimek 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 rG9e9e096ae95b: [clang-format] Fix dropped 'else'. (authored by klimek). Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. H

[PATCH] D146310: [clang-format] Fix dropped 'else' in 398cddf6acec

2023-04-21 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. Submitted. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146310/new/ https://reviews.llvm.org/D146310 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D147217: [OpenMP][OMPIRBuilder] OpenMPIRBuilder support for requires directive

2023-04-21 Thread Sergio Afonso via Phabricator via cfe-commits
skatrak updated this revision to Diff 515684. skatrak added a comment. Avoid creating registration function for the device. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147217/new/ https://reviews.llvm.org/D147217 Files: clang/lib/CodeGen/CGOpe

[clang] 5ea1580 - Revert "Reland [Modules] Remove unnecessary check when generating name lookup table in ASTWriter"

2023-04-21 Thread Ilya Biryukov via cfe-commits
Author: Ilya Biryukov Date: 2023-04-21T14:08:18+02:00 New Revision: 5ea158077ec9ca50857ede5cbb0b27c61663fd55 URL: https://github.com/llvm/llvm-project/commit/5ea158077ec9ca50857ede5cbb0b27c61663fd55 DIFF: https://github.com/llvm/llvm-project/commit/5ea158077ec9ca50857ede5cbb0b27c61663fd55.diff

[PATCH] D148799: [clang] Return `StringRef` from `TargetInfo::getClobbers()`

2023-04-21 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. > Context not available. Please update the diff with context, https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface. I'm not sure what the benefit of this change is. While I did say less raw pointers = better, perhaps I'd make an except

[PATCH] D147844: Emit warning when implicit cast from int to bool happens in an conditional operator expression

2023-04-21 Thread NagaChaitanya Vellanki via Phabricator via cfe-commits
chaitanyav updated this revision to Diff 515687. chaitanyav added a comment. Fix indentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147844/new/ https://reviews.llvm.org/D147844 Files: clang/docs/ReleaseNotes.rst clang/lib/Sema/SemaExpr.

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-21 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added inline comments. Comment at: clang/test/Sema/builtins-wasm.c:12-13 + __builtin_wasm_table_size(table, table);// expected-error {{too many arguments to function call, expected 1, have 2}} + void *a = __builtin_wa

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Jeremy Morse via Phabricator via cfe-commits
jmorse added a comment. /me grumbles about all the world being a VAX, @mstorsjo I can't replicate the crash, but can replicate the valgrind jump-on-uninitialized-value with a small reproducer [0] that doesn't feature any debug-info, using `opt --passes=early-cse reduced.ll`. The trace I've red

[PATCH] D148918: [Test] Regenerate checks using update_test_checks.py

2023-04-21 Thread Philipp via Phabricator via cfe-commits
phst updated this revision to Diff 515695. phst added a comment. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. - Check for a ‘buffer’ type instead of ‘buffer-live’. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D148919: [Clang][Sema] Fix invalid cast when validating SVE types within CheckVariableDeclarationType.

2023-04-21 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm created this revision. Herald added a subscriber: tschuett. Herald added a project: All. paulwalker-arm requested review of this revision. Herald added a reviewer: jdoerfert. Herald added subscribers: cfe-commits, jplehr, sstefan1. Herald added a project: clang. Fixes #62087 Repos

[PATCH] D148918: [Test] Regenerate checks using update_test_checks.py

2023-04-21 Thread Philipp via Phabricator via cfe-commits
phst updated this revision to Diff 515697. phst added a comment. Check for a ‘buffer’ type instead of ‘buffer-live’. In Emacs 29, ‘buffer-live’ is no longer recognized as a type and generates a compilation warning. Every function that requires a live buffer already checks whether the buffer is l

[PATCH] D148919: [Clang][Sema] Fix invalid cast when validating SVE types within CheckVariableDeclarationType.

2023-04-21 Thread Paul Walker via Phabricator via cfe-commits
paulwalker-arm added reviewers: dmgreen, sdesmalen. paulwalker-arm added a comment. This is not my area so I don't know if replacing `isFunctionOrMethod()` rather than just extending the if clause is a bad idea, but all the tests still pass including the new one that would trigger an assert prio

[PATCH] D148799: [clang] Return `StringRef` from `TargetInfo::getClobbers()`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx added a comment. > In this case, no one is manipulating the string until (I assume) after it's > converted to std::string, so we're not removing risky accesses in that way. Maybe the solution is to return some kind of string (std::string or llvm::SmallString) by value or by const referen

[PATCH] D148639: [NFC][clang] Fix static analyzer concerns about AUTO_CAUSES_COPY

2023-04-21 Thread Soumi Manna via Phabricator via cfe-commits
Manna marked an inline comment as done. Manna added a comment. @aaron.ballman, do you have any more concerns or comments? Thank you CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148639/new/ https://reviews.llvm.org/D148639 ___ cfe-commits mai

[PATCH] D148835: [clang] removes trailing whitespace

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D148835#4284871 , @cjdb wrote: > I've had some very good input about why this probably shouldn't go ahead: git > history erasure :') While that is a common criticism, if we're going to do this at all, we should do it in a

[PATCH] D148799: [clang] Return `StringRef` from `TargetInfo::getClobbers()`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx updated this revision to Diff 515707. Stoorx added a comment. Rebase & upload with context CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148799/new/ https://reviews.llvm.org/D148799 Files: clang/include/clang/Basic/TargetInfo.h clang/lib/Basic/Targets/AArch64.cpp clang/lib

[PATCH] D148658: [clang] Make access to submodules via `iterator_range`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx updated this revision to Diff 515708. Stoorx added a comment. Rebase & upload with context CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148658/new/ https://reviews.llvm.org/D148658 Files: clang/include/clang/Basic/Module.h clang/lib/Basic/Module.cpp clang/lib/CodeGen/Code

[PATCH] D148835: [clang] removes trailing whitespace

2023-04-21 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D148835#4286905 , @erichkeane wrote: > In D148835#4284871 , @cjdb wrote: > >> I've had some very good input about why this probably shouldn't go ahead: >> git history erasure :'

[PATCH] D148799: [clang] Return `StringRef` from `TargetInfo::getClobbers()`

2023-04-21 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. You need to clearly state the "why" of the change in the commit message. Sometimes it seems obvious to the author but a reviewer has to assume and may assume incorrectly. In this case, I guess that since the result of the function only has its length checked then

[PATCH] D144651: [Serialization] Place command line defines in the correct file

2023-04-21 Thread John Brawn via Phabricator via cfe-commits
john.brawn added a comment. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144651/new/ https://reviews.llvm.org/D144651 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D134456: [PGO] Consider parent context when weighing branches with likelyhood.

2023-04-21 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Herald added a subscriber: wlei. >> Another point: having a diagnostic fire (failing a `-Werror` build) >> depending on the content of the profile passed to `-fprofile-use` seems >> pretty hostile to build workflows. > > Okay, this last point is especially compelling to m

[PATCH] D148211: [clang][tests] Fix Flang driver tests for Windows

2023-04-21 Thread Ádám Kallai via Phabricator via cfe-commits
kaadam added a comment. Yes, it could be. I will update them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148211/new/ https://reviews.llvm.org/D148211 ___ cfe-commits mailing list cfe-commits@lists.llv

[PATCH] D148849: [OpenMP-OPT] Remove limit for heap to stack conversions of __kmpc_alloc_shared allocations

2023-04-21 Thread Gheorghe-Teodor Bercea via Phabricator via cfe-commits
doru1004 closed this revision. doru1004 added a comment. Commit: 1a58c3d601b4c982afeb714c3a6c4be4d787cbf1 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148849/new/ https://revie

[PATCH] D148914: [Sema][NFC] add check before using `BuildExpressionFromIntegralTemplateArgument`

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane requested changes to this revision. erichkeane added a comment. This revision now requires changes to proceed. This is the wrong fix here, the crash is appropriate here, else we're not getting the type right. For your example, we need to be setting up the template arguments correctly

[PATCH] D148211: [clang][tests] Fix Flang driver tests for Windows

2023-04-21 Thread Ádám Kallai via Phabricator via cfe-commits
kaadam updated this revision to Diff 515717. kaadam added a comment. Updated CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148211/new/ https://reviews.llvm.org/D148211 Files: clang/test/Driver/flang/flang.f90 clang/test/Driver/flang/flang_ucase.F90 clang/test/Driver/flang/multipl

[PATCH] D148918: Check for a ‘buffer’ type instead of ‘buffer-live’.

2023-04-21 Thread Philipp via Phabricator via cfe-commits
phst added a comment. Thanks for the review! I think you also need to land it (I don't seem to have the necessary permissions). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148918/new/ https://reviews.llvm.org/D148918 ___

[PATCH] D148211: [clang][tests] Fix Flang driver tests for Windows

2023-04-21 Thread Bryan Chan via Phabricator via cfe-commits
bryanpkc accepted this revision. bryanpkc added a comment. This revision is now accepted and ready to land. LGTM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148211/new/ https://reviews.llvm.org/D148211 ___ cfe-commits mailing list cfe-commi

[PATCH] D144269: [Analyzer] Show "taint originated here" note of alpha.security.taint.TaintPropagation checker at the correct place

2023-04-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal requested changes to this revision. steakhal added a comment. This revision now requires changes to proceed. I didn't go through the whole revision this time, but I think the next steps are already clear for the next round. My impression was that I might not expressed my intent and expec

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-21 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. I tested this patch on a few open source projects and it significantly reduced the number of alpha.security.ArrayBoundV2 reports: | Project name | memcached | tmux | curl | twin | vim | openssl | | Baseline report #| 0 | 2| 13 | 6

[PATCH] D148799: [clang] Return `StringRef` from `TargetInfo::getClobbers()`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx added a comment. I've looked through usages of `getClobbers` again, and found that in each case the result if the function is casted to `std::string`. clang/lib/CodeGen/CGBuiltin.cpp clang/lib/CodeGen/CGStmt.cpp std::string Constraints = "=r,*Z,~{memory}"; std::string Machine

[PATCH] D148812: [NFC][clang] Fix static analyzer concerns

2023-04-21 Thread Soumi Manna via Phabricator via cfe-commits
Manna marked an inline comment as done. Manna added a comment. @erichkeane do you have any more concerns? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148812/new/ https://reviews.llvm.org/D148812 ___ cfe-commits mailing list cfe-commits@list

[PATCH] D148799: [clang] Return `StringRef` from `TargetInfo::getClobbers()`

2023-04-21 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. string_view is a good call, especially as this is not doing anything fancy with it, and we have recently been allowed to use it. > (Maybe) Make private static field of std::string type for actual clobber > value (or std::string_view type since it can be constexpr-

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D146987#4286797 , @jmorse wrote: > /me grumbles about all the world being a VAX, > > @mstorsjo I can't replicate the crash, but can replicate the valgrind > jump-on-uninitialized-value with a small reproducer [0] that doesn't

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Jeremy Morse via Phabricator via cfe-commits
jmorse added a comment. Ah, you're right, it's actually the same assertion message that @srj reported which I totally skipped over. Currently I suspect that's due to different std::sort implementations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D148812: [NFC][clang] Fix static analyzer concerns

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Still had this convo which wasn't resolved. Comment at: clang/lib/Lex/Pragma.cpp:1110 Module *M = nullptr; - for (auto IIAndLoc : ModuleName) { + for (const auto &IIAndLoc : ModuleName) { M = MM.lookupModuleQualified(IIAndLo

[PATCH] D148799: [clang] Return `std::string_view` from `TargetInfo::getClobbers()`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx updated this revision to Diff 515728. Stoorx retitled this revision from "[clang] Return `StringRef` from `TargetInfo::getClobbers()`" to "[clang] Return `std::string_view` from `TargetInfo::getClobbers()`". Stoorx edited the summary of this revision. Stoorx added a comment. Refactoring a

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. I like this. Looks really solid. I only had style nitpicks. Have you run measurements? After that we could land it, I think. FYI: I'll also schedule a test run with this patch. You should expect the results in a week - not because it takes that long, but because I need

[PATCH] D148799: [clang] Return `std::string_view` from `TargetInfo::getClobbers()`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx added a comment. I did not set `const` qualifier for return type because `std::string_view` is constant by design. Or should I mark it `const` explicitly? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148799/new/ https://reviews.llvm.org/D148799

cfe-commits@lists.llvm.org

2023-04-21 Thread Jens Massberg via Phabricator via cfe-commits
massberg created this revision. massberg added a reviewer: ilya-biryukov. Herald added a project: All. massberg requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch implemed the change proposed in [P2002R1] to 11.11.1 [class.compare.

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added a comment. Okay, so you just added some numbers :D Now it's my turn I guess. I'll compare this version against the version I shared, and use in our product. Stay tuned. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148355/new/ https

[PATCH] D148812: [NFC][clang] Fix static analyzer concerns

2023-04-21 Thread Soumi Manna via Phabricator via cfe-commits
Manna updated this revision to Diff 515729. Manna edited the summary of this revision. Manna added a comment. I have addressed @erichkeane's review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148812/new/ https://reviews.llvm.org/D148812 Files: clang/lib/AST/ASTContext.cpp

[PATCH] D148812: [NFC][clang] Fix static analyzer concerns

2023-04-21 Thread Soumi Manna via Phabricator via cfe-commits
Manna marked an inline comment as done. Manna added inline comments. Comment at: clang/lib/Lex/Pragma.cpp:1110 Module *M = nullptr; - for (auto IIAndLoc : ModuleName) { + for (const auto &IIAndLoc : ModuleName) { M = MM.lookupModuleQualified(IIAndLoc.fir

[PATCH] D148925: Fix discarding void-typed comma expressions

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, tahonermann, shafik, erichkeane. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. First, we need to handle void types in `visitExpr`,

[PATCH] D148658: [clang] Make access to submodules via `iterator_range`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx updated this revision to Diff 515734. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148658/new/ https://reviews.llvm.org/D148658 Files: clang/include/clang/Basic/Module.h clang/lib/Basic/Module.cpp clang/lib/CodeGen/CodeGenModule.cpp clang/lib/Frontend/CompilerInstance.cpp

[PATCH] D148926: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-04-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https

[PATCH] D148799: [clang] Return `std::string_view` from `TargetInfo::getClobbers()`

2023-04-21 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. > I did not set const qualifier for return type because std::string_view is > constant by design. Or should I mark it const explicitly? I'm new to string_view but everything I see backs up that it is a constant view on the data as you say. I'm not sure what making

[PATCH] D148925: Fix discarding void-typed comma expressions

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. So things cast to 'void' can have side effects, right? Does the call to discard still evaluate them? https://godbolt.org/z/a3ej9bxKe constexpr int foo(int start) { int i = start; (void)i++; (void)i++,(void)i++; return i; } constexpr

[PATCH] D148799: [clang] Return `std::string_view` from `TargetInfo::getClobbers()`

2023-04-21 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett added a comment. Build issues will also show up in the "Build Status" here. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148799/new/ https://reviews.llvm.org/D148799 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-21 Thread Donát Nagy via Phabricator via cfe-commits
donat.nagy added a comment. @steakhal Thanks for the review, it was really instructive :). I'll probably upload the updated commit on Monday. What kind of measurements are you suggesting? I analyzed a few open source projects with the patched Clang SA (see results in my previous commit) and a

[PATCH] D148926: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-04-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. This had to be submitted to https://reviews.llvm.org/D134475 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148926/new/ https://reviews.llvm.org/D148926 ___

[PATCH] D148355: [analyzer] Fix comparison logic in ArrayBoundCheckerV2

2023-04-21 Thread Balázs Benics via Phabricator via cfe-commits
steakhal added inline comments. Comment at: clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp:167-168 - NonLoc rawOffsetVal = rawOffset.getByteOffset(); - - // CHECK LOWER BOUND: Is byteOffset < extent begin? - // If so, we are doing a load/store - // before the f

[PATCH] D148914: [Sema][NFC] add check before using `BuildExpressionFromIntegralTemplateArgument`

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. See my comment on https://github.com/llvm/llvm-project/issues/62265 for results of my debugging. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148914/new/ https://reviews.llvm.org/D148914 __

[PATCH] D134475: Add C++11 attribute msvc::constexpr

2023-04-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 515740. RIscRIpt added a comment. A proper implementation In D134475#4224082 , @erichkeane wrote: > I don't have a good idea, I don't think any sort of RAII object is the right > way (since it will be wrong on chi

[PATCH] D148799: [clang] Return `std::string_view` from `TargetInfo::getClobbers()`

2023-04-21 Thread Sviatoslav Osipov via Phabricator via cfe-commits
Stoorx updated this revision to Diff 515752. Stoorx edited the summary of this revision. Stoorx added a comment. Fix, Rebase & retitle CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148799/new/ https://reviews.llvm.org/D148799 Files: clang/include/clang/Basic/TargetInfo.h clang/lib/

[PATCH] D148799: [clang] Return `std::string_view` from `TargetInfo::getClobbers()`

2023-04-21 Thread David Spickett via Phabricator via cfe-commits
DavidSpickett accepted this revision. DavidSpickett added a comment. This revision is now accepted and ready to land. If you have commit access already, wait until the pre-commit builds finish and check there isn't anything failing there. If you don't, I can commit this for you as I did before.

[PATCH] D125171: [clang-format] Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-04-21 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin updated this revision to Diff 515756. jrmolin added a comment. a unit test was failing, so I fixed it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125171/new/ https://reviews.llvm.org/D125171 Files: clang/docs/ClangFormatStyleOptions.r

[PATCH] D125171: [clang-format] Add a new clang-format option AlwaysBreakBeforeFunctionParameters

2023-04-21 Thread jonathan molinatto via Phabricator via cfe-commits
jrmolin added inline comments. Comment at: clang/include/clang/Format/Format.h:851 + /// The function parameter breaking style to use. + /// \version 16.0 + FunctionParameterBreakingStyle BreakBeforeFunctionParameters; so should this be 17.0 now? This has gone

cfe-commits@lists.llvm.org

2023-04-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a reviewer: clang-language-wg. ilya-biryukov added a comment. Thanks! I believe we should also recover in the similar manner we do for missing `const`, see corresponding comment. Extra NITs: - there is a typo in description: *compariosn* should be comparison, - we probably w

[PATCH] D148925: Fix discarding void-typed comma expressions

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 515762. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148925/new/ https://reviews.llvm.org/D148925 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AST/Interp/literals.cpp

[PATCH] D148925: Fix discarding void-typed comma expressions

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D148925#4287218 , @erichkeane wrote: > So things cast to 'void' can have side effects, right? Does the call to > discard still evaluate them? > > https://godbolt.org/z/a3ej9bxKe Yes. `discard(E)` is just `visit(E)`, except

[PATCH] D148925: Fix discarding void-typed comma expressions

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In D148925#4287497 , @tbaeder wrote: > In D148925#4287218 , @erichkeane > wrote: > >> So things cast to 'void' can have side effects, right? Does the call to >> discard still evaluat

[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-04-21 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. Still suspicious about this/whether it models the MSVC implementation correctly, but no real implementation concerns. I REALLY want us to document the attribute extensively however. Comment at: clang/include/clang/Basic/AttrDocs.td:3543 +definitio

[PATCH] D146178: [Clang][Sema] Fix comparison of constraint expressions

2023-04-21 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexander-shaposhnikov added a comment. reduced test case (that is currently blocking this diff) : namespace outer::internal { template concept myconcept = true; } namespace outer { template class Foo; template struct Bar { template friend class Foo; };

[PATCH] D148925: [clang][Interp] Fix discarding void-typed comma expressions

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 515800. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148925/new/ https://reviews.llvm.org/D148925 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/test/AST/Interp/literals.cpp Index: clang/test/AST/Interp/literals.cpp

[PATCH] D148925: [clang][Interp] Fix discarding void-typed comma expressions

2023-04-21 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. In D148925#4287502 , @erichkeane wrote: > Cool! Mind adding the tests I proposed? it would be nice to ensure/show > side-effects are guaranteed. Sure, thanks for the test case! CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-21 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis updated this revision to Diff 515805. TIFitis marked an inline comment as done. TIFitis edited the summary of this revision. TIFitis added a comment. Updated tests. Addressed reviewer comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D146557: [MLIR][OpenMP] Refactoring how map clause is processed

2023-04-21 Thread Akash Banerjee via Phabricator via cfe-commits
TIFitis marked 2 inline comments as done. TIFitis added inline comments. Comment at: mlir/test/Target/LLVMIR/omptarget-llvm.mlir:4-5 -llvm.func @_QPopenmp_target_data() { - %0 = llvm.mlir.constant(1 : i64) : i64 - %1 = llvm.alloca %0 x i32 {bindc_name = "i", in_type = i32, ope

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. In D146987#4287137 , @jmorse wrote: > Ah, you're right, it's actually the same assertion message that @srj reported > which I totally skipped over. Currently I suspect that's due to different > std::sort implementations. ...`std::s

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Jeremy Morse via Phabricator via cfe-commits
jmorse added a comment. In D146987#4287794 , @srj wrote: > (But more seriously, could we please revert all of this unless/until a fix is > imminent? Our testing is dead in the water at the moment.) Should have been reverted in rG0ba922f60046

[PATCH] D146987: [Assignment Tracking] Enable by default

2023-04-21 Thread Steven Johnson via Phabricator via cfe-commits
srj added a comment. In D146987#4287819 , @jmorse wrote: > Should have been reverted in rG0ba922f60046 > earlier > today, are you still experiencing the same behaviour with that patch

[PATCH] D148944: [clang][Driver] Fix crash with unsupported architectures in MinGW and CrossWindows.

2023-04-21 Thread KOMATA Manabu via Phabricator via cfe-commits
k-mana created this revision. k-mana added a reviewer: fhahn. Herald added subscribers: StephenFan, mstorsjo. Herald added a project: All. k-mana requested review of this revision. Herald added subscribers: cfe-commits, MaskRay. Herald added a project: clang. Repository: rG LLVM Github Monorepo

[PATCH] D129835: [clang] adds a discardable attribute

2023-04-21 Thread Christopher Di Bella via Phabricator via cfe-commits
cjdb added a comment. >> With [[discardable]] one just needs to push/pop at the extremes of a file >> (and if a future version of module maps supports global pragmas for a >> module, there too, but that's a discussion that requires a design doc). > > I understood that, I just don't think that's

[PATCH] D148276: [clang] trigger -Wcast-qual on functional casts

2023-04-21 Thread Thurston Dang via Phabricator via cfe-commits
thurston added a comment. I think this change is triggering an error on a buildbot (https://lab.llvm.org/buildbot/#/builders/37/builds/21631/steps/20/logs/stdio): /b/sanitizer-x86_64-linux/build/llvm-project/clang/lib/Analysis/UnsafeBufferUsage.cpp:1348:45: error: cast from 'const clang::AST

[PATCH] D147844: Emit warning when implicit cast from int to bool happens in an conditional operator expression

2023-04-21 Thread Mark de Wever via Phabricator via cfe-commits
Mordante accepted this revision. Mordante added a comment. I too am not really convinced by all changes in libc++. On the other hand I don't think the change make the libc++ code looking bad. So I don't feel a reason to reject the libc++ changes. I don't like the commit message, there's only a

[PATCH] D148817: [RISCV] Add Tag_RISCV_arch attribute by default when using clang as an assembler.

2023-04-21 Thread Alex Bradbury via Phabricator via cfe-commits
asb accepted this revision. asb added a comment. This revision is now accepted and ready to land. I'd appreciate some riscv32 RUN lines for completeness, but otherwise LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148817/new/ https://reviews.

  1   2   >