]> granicus.if.org Git - clang/commitdiff
Make helper functions static.
authorBenjamin Kramer <benny.kra@googlemail.com>
Fri, 15 Feb 2013 12:30:38 +0000 (12:30 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Fri, 15 Feb 2013 12:30:38 +0000 (12:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175265 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaInit.cpp

index 433e76767c449e98255b93e7d2ef0be5829f7029..66d698aec91da6225c466cb1e80336190aad6dfd 100644 (file)
@@ -196,8 +196,7 @@ static bool useInlineVisibilityHidden(const NamedDecl *D) {
     FD->hasBody(Def) && Def->isInlined() && !Def->hasAttr<GNUInlineAttr>();
 }
 
-template<typename T>
-bool isInExternCContext(T *D) {
+template <typename T> static bool isInExternCContext(T *D) {
   const T *First = D->getFirstDeclaration();
   return First->getDeclContext()->isExternCContext();
 }
index d2b4697ee32beaae53aaa19206b386c7f947faa7..d4259026997549e0c1b42f9edc67563842447f4b 100644 (file)
@@ -2065,8 +2065,8 @@ static bool isABIDefaultCC(Sema &S, CallingConv CC, FunctionDecl *D) {
   return ABIDefaultCC == CC;
 }
 
-template<typename T>
-bool haveIncompatibleLanguageLinkages(const T *Old, const T *New) {
+template <typename T>
+static bool haveIncompatibleLanguageLinkages(const T *Old, const T *New) {
   const DeclContext *DC = Old->getDeclContext();
   if (DC->isRecord())
     return false;
index 55b64351381dab281e40dff304dc592266185b68..763a4ce77410c2f1ceddb153fb56f65a4ee64822 100644 (file)
@@ -4945,7 +4945,7 @@ static bool findTrivialSpecialMember(Sema &S, CXXRecordDecl *RD,
   llvm_unreachable("unknown special method kind");
 }
 
-CXXConstructorDecl *findUserDeclaredCtor(CXXRecordDecl *RD) {
+static CXXConstructorDecl *findUserDeclaredCtor(CXXRecordDecl *RD) {
   for (CXXRecordDecl::ctor_iterator CI = RD->ctor_begin(), CE = RD->ctor_end();
        CI != CE; ++CI)
     if (!CI->isImplicit())
index 1b698724170163826e5ca0ed69c6bf1409ffc4b0..0de5b8c76db01a602a66367b6a5501eafe0ae9c0 100644 (file)
@@ -5551,7 +5551,8 @@ InitializationSequence::Perform(Sema &S,
 
 /// Somewhere within T there is an uninitialized reference subobject.
 /// Dig it out and diagnose it.
-bool DiagnoseUninitializedReference(Sema &S, SourceLocation Loc, QualType T) {
+static bool DiagnoseUninitializedReference(Sema &S, SourceLocation Loc,
+                                           QualType T) {
   if (T->isReferenceType()) {
     S.Diag(Loc, diag::err_reference_without_init)
       << T.getNonReferenceType();