erichkeane added a comment.

I'm pretty far behind on reviews of the interpreter, but this one I noticed 
while looking th rough it.



================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:710
+
+  assert(*LT == PT_Ptr);
+
----------------
This is UB here if LT doesn't contain a value.  Additionally, it makes line 712 
really odd here.  It seems that LT isn't really used anywhere in this function. 
 I know classify is meaningful here (and thus needs to run), but I wonder if we 
want to make this:

`assert(LT && *LT == PT_Ptr);` and take out the 1st test on 712.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140874

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

Reply via email to