]> granicus.if.org Git - clang/commitdiff
Make some helper functions static. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Mon, 11 Feb 2019 14:52:15 +0000 (14:52 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Mon, 11 Feb 2019 14:52:15 +0000 (14:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353705 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaCodeComplete.cpp
lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp

index 03d612a3e981815812e5fdc178214c52b02b171e..a042abb6f5f8951ed47a4276682eac709e982068 100644 (file)
@@ -968,8 +968,8 @@ void ResultBuilder::AdjustResultPriorityForDecl(Result &R) {
   }
 }
 
-DeclContext::lookup_result getConstructors(ASTContext &Context,
-                                           const CXXRecordDecl *Record) {
+static DeclContext::lookup_result getConstructors(ASTContext &Context,
+                                                  const CXXRecordDecl *Record) {
   QualType RecordTy = Context.getTypeDeclType(Record);
   DeclarationName ConstructorName =
       Context.DeclarationNames.getCXXConstructorName(
index 0366910870feeb8e7c7e47c73d86a0e924a41975..927e9ae443609ebcc065a34ef3a6f6772e12e9f1 100644 (file)
@@ -182,7 +182,7 @@ static Optional<unsigned> findArgIdxOfSymbol(ProgramStateRef CurrSt,
   return None;
 }
 
-Optional<std::string> findMetaClassAlloc(const Expr *Callee) {
+static Optional<std::string> findMetaClassAlloc(const Expr *Callee) {
   if (const auto *ME = dyn_cast<MemberExpr>(Callee)) {
     if (ME->getMemberDecl()->getNameAsString() != "alloc")
       return None;
@@ -200,8 +200,7 @@ Optional<std::string> findMetaClassAlloc(const Expr *Callee) {
   return None;
 }
 
-std::string findAllocatedObjectName(const Stmt *S,
-                                    QualType QT) {
+static std::string findAllocatedObjectName(const Stmt *S, QualType QT) {
   if (const auto *CE = dyn_cast<CallExpr>(S))
     if (auto Out = findMetaClassAlloc(CE->getCallee()))
       return *Out;