r194603 - Make inline functions in a header file static.

Dmitri Gribenko gribozavr at gmail.com
Wed Nov 13 12:19:22 PST 2013


Author: gribozavr
Date: Wed Nov 13 14:19:22 2013
New Revision: 194603

URL: http://llvm.org/viewvc/llvm-project?rev=194603&view=rev
Log:
Make inline functions in a header file static.

Modified:
    cfe/trunk/tools/libclang/CXComment.h

Modified: cfe/trunk/tools/libclang/CXComment.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CXComment.h?rev=194603&r1=194602&r2=194603&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CXComment.h (original)
+++ cfe/trunk/tools/libclang/CXComment.h Wed Nov 13 14:19:22 2013
@@ -27,20 +27,20 @@ namespace comments {
 
 namespace cxcomment {
 
-inline CXComment createCXComment(const comments::Comment *C,
-                                 CXTranslationUnit TU) {
+static inline CXComment createCXComment(const comments::Comment *C,
+                                        CXTranslationUnit TU) {
   CXComment Result;
   Result.ASTNode = C;
   Result.TranslationUnit = TU;
   return Result;
 }
 
-inline const comments::Comment *getASTNode(CXComment CXC) {
+static inline const comments::Comment *getASTNode(CXComment CXC) {
   return static_cast<const comments::Comment *>(CXC.ASTNode);
 }
 
 template<typename T>
-inline const T *getASTNodeAs(CXComment CXC) {
+static inline const T *getASTNodeAs(CXComment CXC) {
   const comments::Comment *C = getASTNode(CXC);
   if (!C)
     return NULL;
@@ -48,11 +48,11 @@ inline const T *getASTNodeAs(CXComment C
   return dyn_cast<T>(C);
 }
 
-inline ASTContext &getASTContext(CXComment CXC) {
+static inline ASTContext &getASTContext(CXComment CXC) {
   return cxtu::getASTUnit(CXC.TranslationUnit)->getASTContext();
 }
 
-inline comments::CommandTraits &getCommandTraits(CXComment CXC) {
+static inline comments::CommandTraits &getCommandTraits(CXComment CXC) {
   return getASTContext(CXC).getCommentCommandTraits();
 }
 





More information about the cfe-commits mailing list