]> granicus.if.org Git - clang/commitdiff
Make helpers static/anonymous.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 22 Nov 2012 15:02:44 +0000 (15:02 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 22 Nov 2012 15:02:44 +0000 (15:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@168500 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Checkers/MallocChecker.cpp
tools/libclang/CIndexCodeCompletion.cpp

index aadf2ddfc9c3a640ed06d63d971aa35b1a311690..33f68b6c112248ef235096d3bcd8198421e1a176 100644 (file)
@@ -627,8 +627,8 @@ ProgramStateRef MallocChecker::FreeMemAux(CheckerContext &C,
 
 /// Checks if the previous call to free on the given symbol failed - if free
 /// failed, returns true. Also, returns the corresponding return value symbol.
-bool didPreviousFreeFail(ProgramStateRef State,
-                         SymbolRef Sym, SymbolRef &RetStatusSymbol) {
+static bool didPreviousFreeFail(ProgramStateRef State,
+                                SymbolRef Sym, SymbolRef &RetStatusSymbol) {
   const SymbolRef *Ret = State->get<FreeReturnValue>(Sym);
   if (Ret) {
     assert(*Ret && "We should not store the null return symbol");
index 46af661d0e5cd48379c3258ec445bf389dad3505..67e64c4e232099209f8d8b42f4aa7611c463bfe7 100644 (file)
@@ -236,7 +236,8 @@ clang_getCompletionBriefComment(CXCompletionString completion_string) {
   return createCXString(CCStr->getBriefComment(), /*DupString=*/false);
 }
 
-  
+namespace {
+
 /// \brief The CXCodeCompleteResults structure we allocate internally;
 /// the client only sees the initial CXCodeCompleteResults structure.
 struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults {
@@ -298,6 +299,8 @@ struct AllocatedCXCodeCompleteResults : public CXCodeCompleteResults {
   std::string Selector;
 };
 
+} // end anonymous namespace
+
 /// \brief Tracks the number of code-completion result objects that are 
 /// currently active.
 ///