================
@@ -133,24 +191,49 @@ void FactsGenerator::VisitCXXNullPtrLiteralExpr(
     const CXXNullPtrLiteralExpr *N) {
   /// TODO: Handle nullptr expr as a special 'null' loan. Uninitialized
   /// pointers can use the same type of loan.
-  FactMgr.getOriginMgr().getOrCreate(*N);
+  getOriginsList(*N);
 }
 
 void FactsGenerator::VisitImplicitCastExpr(const ImplicitCastExpr *ICE) {
-  if (!hasOrigin(ICE))
+  OriginList *Dest = getOriginsList(*ICE);
+  if (!Dest)
+    return;
+  OriginList *SrcList = getOriginsList(*ICE->getSubExpr());
+
+  switch (ICE->getCastKind()) {
+  case CK_LValueToRValue:
+    // TODO: Decide what to do for x-values here.
+    if (!ICE->getSubExpr()->isLValue())
+      return;
+
+    assert(SrcList && "LValue being cast to RValue has no origin list");
+    // The result of an LValue-to-RValue cast on a reference-to-pointer like
----------------
ymand wrote:

nit: missing word after "like"?

https://github.com/llvm/llvm-project/pull/168344
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to