We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0da7e40 commit 651f4ceCopy full SHA for 651f4ce
clang/lib/AST/Interp/Integral.h
@@ -107,7 +107,7 @@ template <unsigned Bits, bool Signed> class Integral {
107
return APSInt(APInt(Bits, static_cast<uint64_t>(V), Signed), !Signed);
108
}
109
APSInt toAPSInt(unsigned NumBits) const {
110
- if (Signed)
+ if constexpr (Signed)
111
return APSInt(toAPSInt().sextOrTrunc(NumBits), !Signed);
112
else
113
return APSInt(toAPSInt().zextOrTrunc(NumBits), !Signed);
@@ -171,7 +171,7 @@ template <unsigned Bits, bool Signed> class Integral {
171
172
173
template <bool SrcSign> static Integral from(Integral<0, SrcSign> Value) {
174
- if (SrcSign)
+ if constexpr (SrcSign)
175
return Integral(Value.V.getSExtValue());
176
177
return Integral(Value.V.getZExtValue());
0 commit comments