aaron.ballman marked an inline comment as done.
aaron.ballman added inline comments.


================
Comment at: clang/lib/Sema/SemaDecl.cpp:15319-15321
   // OpenCL v2.0 s6.9.u - Implicit function declaration is not supported.
   else if (getLangOpts().OpenCL)
     diag_id = diag::err_opencl_implicit_function_decl;
----------------
aaron.ballman wrote:
> rsmith wrote:
> > Should we even be calling this function in OpenCL mode? It seems a bit 
> > inconsistent that we avoid calling this in C++ and C2x mode, and that we 
> > call it but error in OpenCL mode.
> > 
> > Maybe there should be a function on `LangOptions` to ask if implicit 
> > function declarations are permitted in the current language mode, to make 
> > it easy to opt out the right cases? (Happy for this to be a follow-on 
> > change if you agree.)
> I agree that it does seem inconsistent. I can look into making that change in 
> a follow-up.
I've fixed that up in a9d68a5524dea113cace5983697786599cbdce9a, thanks for the 
suggestion!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122983

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

Reply via email to