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);
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);
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits