[PATCH] D31981: Fix warning in Attributes.cpp
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 10:30:38 PDT 2017
rnk added inline comments.
================
Comment at: lib/IR/Attributes.cpp:542
std::pair<unsigned, Optional<unsigned>> AttributeSet::getAllocSizeArgs() const {
- return SetNode ? SetNode->getAllocSizeArgs() : std::make_pair(0, 0);
}
----------------
kzhuravl wrote:
> arsenm wrote:
> > Could you just add u suffixes to the 0s instead?
> I could make it `std::make_pair(0U, Optional<unsigned>(0))`. If that is preferred?
That or `std::pair<unsigned, Optional<unsigned>>(0, 0)`. We don't need `make_pair` if it can't deduce the types.
https://reviews.llvm.org/D31981
More information about the llvm-commits
mailing list