aaron.ballman added inline comments.

================
Comment at: clang/lib/Sema/SemaChecking.cpp:6711
+  // Prepare FDecl type
+  QualType Pointee = Context.getFunctionType(Context.VoidTy, {}, {});
+  QualType Type = Context.getPointerType(Pointee);
----------------
erichkeane wrote:
> aaron.ballman wrote:
> > I'm still wondering why this code is needed and what it's trying to do. It 
> > worries me that we're changing the type of the call expression like this.
> This appears to be a 'custom type checking' builtin, where the code in Sema 
> has to check the arguments (rather than the automatic behavior working), and 
> set its return type to the 'correct' one.  It appears that this accepts no 
> arguments, then changes the result of the builtin.
> 
> So this doesn't seem particularly odd, other than the strange comments above.
Oh yeah that's right, that is how the custom checking code works, thank you for 
the reminder!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D128440

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

Reply via email to