martong added a comment.

> Now I'm going to make unittests for SValBuilder::evalCast. Let me ask you to 
> offer me some examples of casts to check. As many cases we can collect as 
> robust the test would be. E.g.

This is not going to be easy. I guess we should cover both implicit and 
explicit type conversions. C++ is ridiculously complex in these domains. For 
maximal precision I'd suggest to systematically go through the below pages and 
try to cover each major case:
https://en.cppreference.com/w/cpp/language/explicit_cast
https://en.cppreference.com/w/cpp/language/implicit_conversion



================
Comment at: 
clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h:105
 
-  SVal evalCast(SVal val, QualType castTy, QualType originalType);
+  SVal evalCast(SVal V, QualType CastTy, QualType OriginalTy);
+  SVal evalCastKind(UndefinedVal V, QualType CastTy, QualType OriginalTy);
----------------
+1 for this kind of splitting, makes the code cleaner for me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90157/new/

https://reviews.llvm.org/D90157

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to