[PATCH] D69242: [Sema] Make helper in TreeTransform.h 'inline' instead of 'static'. NFC

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 21 02:06:17 PDT 2019


ilya-biryukov created this revision.
ilya-biryukov added a reviewer: Anastasia.
Herald added a project: clang.
ilya-biryukov retitled this revision from "[Sema] Make helper in Sema.h 'inline' instead of 'static'" to "[Sema] Make helper in TreeTransform.h 'inline' instead of 'static'. NFC".

There seems to be no evidence that having internal linkage for the function
was intentional. Since 'static' functions are normally used only in .cpp
files, using 'inline' in the header file is more appropriate.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69242

Files:
  clang/lib/Sema/TreeTransform.h


Index: clang/lib/Sema/TreeTransform.h
===================================================================
--- clang/lib/Sema/TreeTransform.h
+++ clang/lib/Sema/TreeTransform.h
@@ -4536,7 +4536,7 @@
 
 /// Helper to deduce addr space of a pointee type in OpenCL mode.
 /// If the type is updated it will be overwritten in PointeeType param.
-static void deduceOpenCLPointeeAddrSpace(Sema &SemaRef, QualType &PointeeType) {
+inline void deduceOpenCLPointeeAddrSpace(Sema &SemaRef, QualType &PointeeType) {
   if (PointeeType.getAddressSpace() == LangAS::Default)
     PointeeType = SemaRef.Context.getAddrSpaceQualType(PointeeType,
                                                        LangAS::opencl_generic);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69242.225838.patch
Type: text/x-patch
Size: 711 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191021/cf9bddc9/attachment.bin>


More information about the cfe-commits mailing list