diff options
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 4 | ||||
-rw-r--r-- | clang/tools/libclang/CIndexCodeCompletion.cpp | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index aadf2ddfc9c..33f68b6c112 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp @@ -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"); diff --git a/clang/tools/libclang/CIndexCodeCompletion.cpp b/clang/tools/libclang/CIndexCodeCompletion.cpp index 46af661d0e5..67e64c4e232 100644 --- a/clang/tools/libclang/CIndexCodeCompletion.cpp +++ b/clang/tools/libclang/CIndexCodeCompletion.cpp @@ -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. /// |