kadircet added inline comments.

================
Comment at: clang/lib/Sema/SemaChecking.cpp:4567
   if (ParamTy->isPointerType())
     ArgTy = ArgTy->getPointeeType();
 
----------------
i think ArgTy becomes null after this operation. e.g. the function requires a 
pointer param, user provides a non-pointer arg in a context where recovery 
exprs would keep the ast call attached.

I've also spent quite some time trying to reproduce but no luck.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:4657
       // Args[ArgIdx] can be null in malformed code.
       if (const Expr *Arg = Args[ArgIdx]) {
         QualType ParamTy = Proto->getParamType(ArgIdx);
----------------
i think before diving in here we should ensure this `Expr` doesn't have type or 
error dependence.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D103825

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

Reply via email to