ChuanqiXu marked an inline comment as done.
ChuanqiXu added inline comments.
================
Comment at: clang/include/clang/AST/DeclTemplate.h:1156-1157
- TemplateParmPosition(unsigned D, unsigned P) : Depth(D), Position(P) {}
+ static constexpr unsigned MaxDepth = (1l << DEPTH_BITWIDTH) - 1;
+ static constexpr unsigned MaxPosition = (1l << POSITION_BITWIDTH) - 1;
+
----------------
aaron.ballman wrote:
> ChuanqiXu wrote:
> > I don't find standard way to generate the maximum value for bit fields.. So
> > I choose to calculate it by hand.
> Since we're adding 1 everywhere we look at these values, would it make more
> sense to drop the -1 here and the +1 elsewhere?
Maybe we're able to drop the -1 here. But I feel it breaks the semantics. So I
feel it is not good.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123298/new/
https://reviews.llvm.org/D123298
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits