[PATCH] D107347: [Sema] haveSameParameterTypes - fix repeated isNull() test
Simon Pilgrim via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 5 02:50:39 PDT 2021
RKSimon added inline comments.
================
Comment at: clang/lib/Sema/SemaOverload.cpp:9528
QualType T2 = NextParam(F2, I2, I == 0);
- if (!T1.isNull() && !T1.isNull() && !Context.hasSameUnqualifiedType(T1, T2))
+ if (!T1.isNull() && !T2.isNull() && !Context.hasSameUnqualifiedType(T1, T2))
return false;
----------------
@rsmith Can these isNull checks ever fail? Or would we be better off changing them into an assert?
```
QualType T1 = NextParam(F1, I1, I == 0);
QualType T2 = NextParam(F2, I2, I == 0);
assert(!T1.isNull() && !T2.isNull() && "Unknown types");
if (!Context.hasSameUnqualifiedType(T1, T2))
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107347/new/
https://reviews.llvm.org/D107347
More information about the cfe-commits
mailing list