Charusso marked an inline comment as done.
Charusso added inline comments.
================
Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:83-93
+static QualType getRecordType(QualType Ty) {
+ Ty = Ty.getCanonicalType();
+
+ if (Ty->isPointerType())
+ return getRecordType(Ty->getPointeeType());
+ if (Ty->isReferenceType())
----------------
NoQ wrote:
> NoQ wrote:
> > Most of the time we should know exactly how many pointer/reference types we
> > need to unwrap. I really prefer we hard-assert this knowledge instead of
> > blindly unwrapping as many pointer/reference types as we want. Because
> > every time we have an unexpected number of unwraps it's an indication that
> > something went horribly wrong. So it's good to have the extra sanity
> > checking.
> I think this one is still forgotten. Maybe a FIXME?
Now I pattern-match that rule in the `evalCall()`, therefore we cannot try to
evaluate nested references. Would you like to see more checks?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66325/new/
https://reviews.llvm.org/D66325
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits