[PATCH] D39579: BuiltinOperatorOverloadBuilder: Don't consider types that are unavailable on the target (PR35174)
Hans Wennborg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 15 09:13:17 PST 2017
hans added inline comments.
================
Comment at: lib/Sema/SemaOverload.cpp:7618
- // Define some constants used to index and iterate over the arithemetic types
- // provided via the getArithmeticType() method below.
- // The "promoted arithmetic types" are the arithmetic
+ SmallVector<CanQualType, 24> ArithmeticTypes;
+
----------------
rsmith wrote:
> Can we do better than a magic number here? I don't like that getting this wrong will lead to a silent performance change. (Can we at least assert `isSmall()` below or something?)
It turns out `isSmall()` isn't public, so I can't use that directly, but I've added a constant for the capacity and an assert against that.
I don't actually know if there's any good reason for `isSmall()` to not be public. If you agree, I can follow up and just use that.
https://reviews.llvm.org/D39579
More information about the cfe-commits
mailing list