Anastasia added inline comments.

================
Comment at: lib/Sema/Sema.cpp:1856
 
+std::string Sema::getOpenCLExtensionsFromDeclExtMap(FunctionDecl *FD) {
+  if (!OpenCLDeclExtMap.empty())
----------------
sidorovd wrote:
> Anastasia wrote:
> > Is this function to be used for both `OpenCLDeclExtMap` and 
> > `OpenCLTypeExtMap`? If yes, may be we could give it more generic name like 
> > 'getOpenCLExtensionsFromExtMap'...
> No, this exact function is only for 'OpenCLDeclExtMap', for the type map one 
> should implement a new function 'getOpenCLExtensionsFromTypeExtMap'. Actually 
> I have done this for https://reviews.llvm.org/D51341 to make the patch more 
> generic, but since I'm not sure if it ever came to light I can add it here 
> unused.
I think it's ok to provide generic helper function even if it's not used 
currently. But if you don't want to do this is there any value in splitting 
this into two function and using template?


https://reviews.llvm.org/D52292



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

Reply via email to