r231811 - Make helper functions static. NFC.
Benjamin Kramer
benny.kra at googlemail.com
Tue Mar 10 11:24:02 PDT 2015
Author: d0k
Date: Tue Mar 10 13:24:01 2015
New Revision: 231811
URL: http://llvm.org/viewvc/llvm-project?rev=231811&view=rev
Log:
Make helper functions static. NFC.
Modified:
cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
Modified: cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp?rev=231811&r1=231810&r2=231811&view=diff
==============================================================================
--- cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp (original)
+++ cfe/trunk/tools/libclang/CIndexCodeCompletion.cpp Tue Mar 10 13:24:01 2015
@@ -656,7 +656,7 @@ struct CodeCompleteAtInfo {
unsigned options;
CXCodeCompleteResults *result;
};
-void clang_codeCompleteAt_Impl(void *UserData) {
+static void clang_codeCompleteAt_Impl(void *UserData) {
CodeCompleteAtInfo *CCAI = static_cast<CodeCompleteAtInfo*>(UserData);
CXTranslationUnit TU = CCAI->TU;
const char *complete_filename = CCAI->complete_filename;
Modified: cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp?rev=231811&r1=231810&r2=231811&view=diff
==============================================================================
--- cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/trunk/utils/TableGen/ClangAttrEmitter.cpp Tue Mar 10 13:24:01 2015
@@ -28,6 +28,7 @@
using namespace llvm;
+namespace {
class FlattenedSpelling {
std::string V, N, NS;
bool K;
@@ -53,8 +54,10 @@ public:
const std::string &nameSpace() const { return NS; }
bool knownToGCC() const { return K; }
};
+} // namespace
-std::vector<FlattenedSpelling> GetFlattenedSpellings(const Record &Attr) {
+static std::vector<FlattenedSpelling>
+GetFlattenedSpellings(const Record &Attr) {
std::vector<Record *> Spellings = Attr.getValueAsListOfDefs("Spellings");
std::vector<FlattenedSpelling> Ret;
More information about the cfe-commits
mailing list