Make helper functions static. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 10 Mar 2015 18:24:01 +0000 (18:24 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 10 Mar 2015 18:24:01 +0000 (18:24 +0000)
llvm-svn: 231811

clang/tools/libclang/CIndexCodeCompletion.cpp
clang/utils/TableGen/ClangAttrEmitter.cpp

index 47f2c14..55f4131 100644 (file)
@@ -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;
index 16b38a3..4bf1808 100644 (file)
@@ -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;