[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-10-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D67647#1713974 , @comex wrote: > So, I landed this patch but had to revert it as it broke the build on MSVC > (and only MSVC). That was almost a month ago, but I haven't gotten back > around to this until now – sorry :| > >

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-10-17 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 225557. comex marked 2 inline comments as done. comex added a comment. So, I landed this patch but had to revert it as it broke the build on MSVC (and only MSVC). That was almost a month ago, but I haven't gotten back around to this until now – sorry :| In

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-26 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: llvm/include/llvm/ADT/iterator_range.h:27-33 +template +constexpr bool is_random_iterator() { + return std::is_same< +typename std::iterator_traits::iterator_category, +std::random_access_iterator_tag>::value; +} +

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-26 Thread Nicholas Allegra via Phabricator via cfe-commits
comex marked 2 inline comments as done. comex added inline comments. Comment at: llvm/include/llvm/ADT/iterator_range.h:27-33 +template +constexpr bool is_random_iterator() { + return std::is_same< +typename std::iterator_traits::iterator_category, +

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added a comment. This revision is now accepted and ready to land. Sounds good - thanks! Comment at: llvm/include/llvm/ADT/iterator_range.h:27-33 +template +constexpr bool is_random_iterator() { + return std::is_same< +typename

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-19 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 220926. comex added a comment. In D67647#1674795 , @dblaikie wrote: > Right - I was suggesting that could be changed. Would it be OK to you to > change arguments() to return ArrayRef? Or would you rather avoid that to

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D67647#1674781 , @comex wrote: > In D67647#1674773 , @dblaikie wrote: > > > I wasn't expecting it to involve all this work - but instead to change > > "arguments()" to return ArrayRef.

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. In D67647#1674773 , @dblaikie wrote: > I wasn't expecting it to involve all this work - but instead to change > "arguments()" to return ArrayRef. Though perhaps you didn't go that route to > allow future fixes to the strict

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D67647#1674745 , @comex wrote: > Here's a new version of the patch that uses iterator ranges instead of > `ArrayRef`, to avoid adding new uses of `CallExpr::getArgs()` in case it has > to be removed in the future due to the

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-18 Thread Nicholas Allegra via Phabricator via cfe-commits
comex updated this revision to Diff 220771. comex added a comment. Herald added subscribers: llvm-commits, dexonsmith. Herald added a project: LLVM. Here's a new version of the patch that uses iterator ranges instead of `ArrayRef`, to avoid adding new uses of `CallExpr::getArgs()` in case it has

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-18 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D67647#1673363 , @comex wrote: > Ugh, it looks like `getArgs()` is a massive strict aliasing violation. And > it's used in enough different places in Clang that fixing the violation may > require extensive refactoring...

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-17 Thread Nicholas Allegra via Phabricator via cfe-commits
comex added a comment. Ugh, it looks like `getArgs()` is a massive strict aliasing violation. And it's used in enough different places in Clang that fixing the violation may require extensive refactoring... I've reported the issue as https://bugs.llvm.org/show_bug.cgi?id=43344, but I don't

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-17 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: lib/Analysis/Consumed.cpp:752 + handleCall(Call, nullptr, + llvm::makeArrayRef(Call->getArgs(), Call->getNumArgs()), + FunDecl); probably use "Call->arguments()" here & in the other places that

[PATCH] D67647: [Consumed] Refactor handleCall to take function argument list. NFC.

2019-09-16 Thread Nicholas Allegra via Phabricator via cfe-commits
comex created this revision. comex added a reviewer: dblaikie. Herald added subscribers: cfe-commits, dmgreen, kristof.beyls. Herald added a project: clang. Currently, `handleCall` takes a `CallExpr` as an argument and retrieves the arguments from there. This changes it to take the argument