Charusso added inline comments.

================
Comment at: clang/lib/StaticAnalyzer/Checkers/CastValueChecker.cpp:111
+    QualType Ty = CE->getCallReturnType(C.getASTContext());
+    V = C.getSValBuilder().makeTruthVal(true, Ty);
+  }
----------------
NoQ wrote:
> Charusso wrote:
> > NoQ wrote:
> > > Charusso wrote:
> > > > That is a very lame way to conjure a symbol, but with a cool wrapper I 
> > > > believe this would be okay. Do we have a better way to create a 
> > > > non-null symbol?
> > > This creates a concrete `1` rather than a symbol. That's the right 
> > > behavior for `isa`, but it's not the right behavior for `getAs`. In case 
> > > of `getAs` we need to return our `this`.
> > Could you explain what is `this`, please? At this case we are working with 
> > a `CXXMemberCallExpr`. Do you mean its `getImplicitObjectArgument()`?
> Yeah, its value.
Hm, I have not understand why it is not working as I definitely wanted to use 
`this`. I believe I had forgotten an early-return at a wrong place. Thanks!


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

https://reviews.llvm.org/D65889



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

Reply via email to