diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-15 12:30:38 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-02-15 12:30:38 +0000 |
commit | a574c8909748fc0d2fd723a48334d6d2c72c8227 (patch) | |
tree | e4fa40fba5c8b8c2528dc7cd83d5c18cb6469f12 | |
parent | 7878a7bdebceaa8d8a893abb295027cde619e467 (diff) |
Make helper functions static.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175265 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/Decl.cpp | 3 | ||||
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 4 | ||||
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/SemaInit.cpp | 3 |
4 files changed, 6 insertions, 6 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 433e76767c..66d698aec9 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -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(); } diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index d2b4697ee3..d425902699 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -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; diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index 55b6435138..763a4ce774 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -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()) diff --git a/lib/Sema/SemaInit.cpp b/lib/Sema/SemaInit.cpp index 1b69872417..0de5b8c76d 100644 --- a/lib/Sema/SemaInit.cpp +++ b/lib/Sema/SemaInit.cpp @@ -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(); |