[cfe-commits] r168500 - in /cfe/trunk: lib/StaticAnalyzer/Checkers/MallocChecker.cpp tools/libclang/CIndexCodeCompletion.cpp
Benjamin Kramer
benny.kra at googlemail.com
Thu Nov 22 07:02:45 PST 2012
Author: d0k
Date: Thu Nov 22 09:02:44 2012
New Revision: 168500
URL: http://llvm.org/viewvc/llvm-project?rev=168500&view=rev
Log:
Make helpers static/anonymous.
Modified:
cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp?rev=168500&r1=168499&r2=168500&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Checkers/MallocChecker.cpp Thu Nov 22 09:02:44 2012
@@ -627,8 +627,8 @@
/// 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");
Modified: cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp?rev=168500&r1=168499&r2=168500&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp Thu Nov 22 09:02:44 2012
@@ -236,7 +236,8 @@
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 @@
std::string Selector;
};
+} // end anonymous namespace
+
/// \brief Tracks the number of code-completion result objects that are
/// currently active.
///
More information about the cfe-commits
mailing list