diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-06-22 09:47:44 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-06-22 09:47:44 +0000 |
commit | ac58acc7f25239a1d9ef45a97aa4a395ef714748 (patch) | |
tree | fa39561f2a6b22c1e6f3368535fbd2e08df2fbdd /tools | |
parent | 6177d6a1c142dff1f7febfc9186909e0408e3ed5 (diff) | |
download | clang-ac58acc7f25239a1d9ef45a97aa4a395ef714748.tar.gz |
Fixed/added namespace ending comments using clang-tidy. NFC
The patch is generated using this command:
$ tools/extra/clang-tidy/tool/run-clang-tidy.py -fix \
-checks=-*,llvm-namespace-comment -header-filter='llvm/.*|clang/.*' \
work/llvm/tools/clang
To reduce churn, not touching namespaces spanning less than 10 lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools')
-rw-r--r-- | tools/diagtool/DiagTool.h | 2 | ||||
-rw-r--r-- | tools/diagtool/ListWarnings.cpp | 2 | ||||
-rw-r--r-- | tools/diagtool/ShowEnabledWarnings.cpp | 2 | ||||
-rw-r--r-- | tools/driver/cc1as_main.cpp | 2 | ||||
-rw-r--r-- | tools/libclang/CIndex.cpp | 10 | ||||
-rw-r--r-- | tools/libclang/CIndexCodeCompletion.cpp | 4 | ||||
-rw-r--r-- | tools/libclang/CIndexDiagnostic.cpp | 2 | ||||
-rw-r--r-- | tools/libclang/CIndexer.h | 4 | ||||
-rw-r--r-- | tools/libclang/CLog.h | 4 | ||||
-rw-r--r-- | tools/libclang/CXCursor.cpp | 4 | ||||
-rw-r--r-- | tools/libclang/CXCursor.h | 3 | ||||
-rw-r--r-- | tools/libclang/CXLoadedDiagnostic.cpp | 4 | ||||
-rw-r--r-- | tools/libclang/CXLoadedDiagnostic.h | 2 | ||||
-rw-r--r-- | tools/libclang/CXSourceLocation.h | 3 | ||||
-rw-r--r-- | tools/libclang/CXString.h | 4 | ||||
-rw-r--r-- | tools/libclang/CXTranslationUnit.h | 3 | ||||
-rw-r--r-- | tools/libclang/CursorVisitor.h | 4 | ||||
-rw-r--r-- | tools/libclang/Indexing.cpp | 2 | ||||
-rw-r--r-- | tools/libclang/IndexingContext.h | 3 |
19 files changed, 34 insertions, 30 deletions
diff --git a/tools/diagtool/DiagTool.h b/tools/diagtool/DiagTool.h index 04b926df3b..c1ae0e5427 100644 --- a/tools/diagtool/DiagTool.h +++ b/tools/diagtool/DiagTool.h @@ -54,7 +54,7 @@ public: RegisterDiagTool() { diagTools->registerTool(new DIAGTOOL()); } }; -} // end diagtool namespace +} // namespace diagtool #define DEF_DIAGTOOL(NAME, DESC, CLSNAME)\ namespace {\ diff --git a/tools/diagtool/ListWarnings.cpp b/tools/diagtool/ListWarnings.cpp index 3e6e88306e..10c86b4d96 100644 --- a/tools/diagtool/ListWarnings.cpp +++ b/tools/diagtool/ListWarnings.cpp @@ -37,7 +37,7 @@ struct Entry { bool operator<(const Entry &x) const { return DiagName < x.DiagName; } }; -} +} // namespace static void printEntries(std::vector<Entry> &entries, llvm::raw_ostream &out) { for (std::vector<Entry>::iterator it = entries.begin(), ei = entries.end(); diff --git a/tools/diagtool/ShowEnabledWarnings.cpp b/tools/diagtool/ShowEnabledWarnings.cpp index 06f74320b7..67094a5836 100644 --- a/tools/diagtool/ShowEnabledWarnings.cpp +++ b/tools/diagtool/ShowEnabledWarnings.cpp @@ -34,7 +34,7 @@ namespace { bool operator<(const PrettyDiag &x) const { return Name < x.Name; } }; -} +} // namespace static void printUsage() { llvm::errs() << "Usage: diagtool show-enabled [<flags>] <single-input.c>\n"; diff --git a/tools/driver/cc1as_main.cpp b/tools/driver/cc1as_main.cpp index 3b55441e18..73883c4f60 100644 --- a/tools/driver/cc1as_main.cpp +++ b/tools/driver/cc1as_main.cpp @@ -149,7 +149,7 @@ public: DiagnosticsEngine &Diags); }; -} +} // namespace bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, ArrayRef<const char *> Argv, diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp index 2216ec61af..857e276f8c 100644 --- a/tools/libclang/CIndex.cpp +++ b/tools/libclang/CIndex.cpp @@ -1897,7 +1897,7 @@ private: void EnqueueChildren(const Stmt *S); void EnqueueChildren(const OMPClause *S); }; -} // end anonyous namespace +} // namespace void EnqueueVisitor::AddDeclarationNameInfo(const Stmt *S) { // 'S' should always be non-null, since it comes from the @@ -2098,7 +2098,7 @@ OMPClauseEnqueue::VisitOMPCopyprivateClause(const OMPCopyprivateClause *C) { void OMPClauseEnqueue::VisitOMPFlushClause(const OMPFlushClause *C) { VisitOMPClauseList(C); } -} +} // namespace void EnqueueVisitor::EnqueueChildren(const OMPClause *S) { unsigned size = WL.size(); @@ -2783,7 +2783,7 @@ buildPieces(unsigned NameFlags, bool IsMemberRefExpr, return Pieces; } -} +} // namespace //===----------------------------------------------------------------------===// // Misc. API hooks. @@ -5616,7 +5616,7 @@ public: assert(PostChildrenInfos.empty()); } }; -} +} // namespace void AnnotateTokensWorker::AnnotateTokens() { // Walk the AST within the region of interest, annotating tokens @@ -7116,7 +7116,7 @@ void SetSafetyThreadStackSize(unsigned Value) { SafetyStackThreadSize = Value; } -} +} // namespace clang void clang::setThreadBackgroundPriority() { if (getenv("LIBCLANG_BGPRIO_DISABLE")) diff --git a/tools/libclang/CIndexCodeCompletion.cpp b/tools/libclang/CIndexCodeCompletion.cpp index a7b8e29204..6637abbf86 100644 --- a/tools/libclang/CIndexCodeCompletion.cpp +++ b/tools/libclang/CIndexCodeCompletion.cpp @@ -644,7 +644,7 @@ namespace { StoredResults.clear(); } }; -} +} // namespace extern "C" { struct CodeCompleteAtInfo { @@ -996,7 +996,7 @@ namespace { return result < 0; } }; -} +} // namespace extern "C" { void clang_sortCodeCompletionResults(CXCompletionResult *Results, diff --git a/tools/libclang/CIndexDiagnostic.cpp b/tools/libclang/CIndexDiagnostic.cpp index 9ba36a6a0f..24d8af8060 100644 --- a/tools/libclang/CIndexDiagnostic.cpp +++ b/tools/libclang/CIndexDiagnostic.cpp @@ -155,7 +155,7 @@ public: CXDiagnosticSetImpl *CurrentSet; CXDiagnosticSetImpl *MainSet; }; -} +} // namespace CXDiagnosticSetImpl *cxdiag::lazyCreateDiags(CXTranslationUnit TU, bool checkIfChanged) { diff --git a/tools/libclang/CIndexer.h b/tools/libclang/CIndexer.h index 8a306cde67..3e16f32db7 100644 --- a/tools/libclang/CIndexer.h +++ b/tools/libclang/CIndexer.h @@ -120,7 +120,7 @@ public: MacroDefinitionRecord *checkForMacroInMacroDefinition(const MacroInfo *MI, const Token &Tok, CXTranslationUnit TU); - } - } + } // namespace cxindex + } // namespace clang #endif diff --git a/tools/libclang/CLog.h b/tools/libclang/CLog.h index b9309ed192..6a6e90abea 100644 --- a/tools/libclang/CLog.h +++ b/tools/libclang/CLog.h @@ -87,8 +87,8 @@ public: Logger &operator<<(const llvm::format_object_base &Fmt); }; -} -} +} // namespace cxindex +} // namespace clang /// \brief Macros to automate common uses of Logger. Like this: /// \code diff --git a/tools/libclang/CXCursor.cpp b/tools/libclang/CXCursor.cpp index b8bb28ed85..2950451ac3 100644 --- a/tools/libclang/CXCursor.cpp +++ b/tools/libclang/CXCursor.cpp @@ -1249,7 +1249,7 @@ public: x.data[1] == y.data[1]; } }; -} +} // namespace llvm extern "C" { CXCursorSet clang_createCXCursorSet() { @@ -1325,7 +1325,7 @@ namespace { } } }; -} +} // namespace void *cxcursor::createOverridenCXCursorsPool() { return new OverridenCursorsPool(); diff --git a/tools/libclang/CXCursor.h b/tools/libclang/CXCursor.h index 083b86934d..ec88d53bb7 100644 --- a/tools/libclang/CXCursor.h +++ b/tools/libclang/CXCursor.h @@ -294,6 +294,7 @@ inline bool operator!=(CXCursor X, CXCursor Y) { /// first in a declaration group. bool isFirstInDeclGroup(CXCursor C); -}} // end namespace: clang::cxcursor +} // namespace cxcursor +} // namespace clang #endif diff --git a/tools/libclang/CXLoadedDiagnostic.cpp b/tools/libclang/CXLoadedDiagnostic.cpp index 754ad55a66..746e4579da 100644 --- a/tools/libclang/CXLoadedDiagnostic.cpp +++ b/tools/libclang/CXLoadedDiagnostic.cpp @@ -56,7 +56,7 @@ public: return mem; } }; -} +} // namespace //===----------------------------------------------------------------------===// // Cleanup. @@ -246,7 +246,7 @@ public: CXDiagnosticSet load(const char *file); }; -} +} // namespace CXDiagnosticSet DiagLoader::load(const char *file) { TopDiags = llvm::make_unique<CXLoadedDiagnosticSetImpl>(); diff --git a/tools/libclang/CXLoadedDiagnostic.h b/tools/libclang/CXLoadedDiagnostic.h index d5006a4444..b68392783f 100644 --- a/tools/libclang/CXLoadedDiagnostic.h +++ b/tools/libclang/CXLoadedDiagnostic.h @@ -89,6 +89,6 @@ public: unsigned severity; unsigned category; }; -} +} // namespace clang #endif diff --git a/tools/libclang/CXSourceLocation.h b/tools/libclang/CXSourceLocation.h index f0b3f49549..3cb78d23a1 100644 --- a/tools/libclang/CXSourceLocation.h +++ b/tools/libclang/CXSourceLocation.h @@ -73,6 +73,7 @@ static inline SourceRange translateCXSourceRange(CXSourceRange R) { } -}} // end namespace: clang::cxloc +} // namespace cxloc +} // namespace clang #endif diff --git a/tools/libclang/CXString.h b/tools/libclang/CXString.h index 72ac0cf469..3d54690dde 100644 --- a/tools/libclang/CXString.h +++ b/tools/libclang/CXString.h @@ -96,12 +96,12 @@ CXStringBuf *getCXStringBuf(CXTranslationUnit TU); /// \brief Returns true if the CXString data is managed by a pool. bool isManagedByPool(CXString str); -} +} // namespace cxstring static inline StringRef getContents(const CXUnsavedFile &UF) { return StringRef(UF.Contents, UF.Length); } -} +} // namespace clang #endif diff --git a/tools/libclang/CXTranslationUnit.h b/tools/libclang/CXTranslationUnit.h index 6022c9dab1..9054c50910 100644 --- a/tools/libclang/CXTranslationUnit.h +++ b/tools/libclang/CXTranslationUnit.h @@ -78,6 +78,7 @@ public: }; -}} // end namespace clang::cxtu +} // namespace cxtu +} // namespace clang #endif diff --git a/tools/libclang/CursorVisitor.h b/tools/libclang/CursorVisitor.h index 1b2a922204..a00fc98573 100644 --- a/tools/libclang/CursorVisitor.h +++ b/tools/libclang/CursorVisitor.h @@ -263,8 +263,8 @@ public: LLVM_ATTRIBUTE_NOINLINE bool Visit(const Stmt *S); }; -} -} +} // namespace cxcursor +} // namespace clang #endif diff --git a/tools/libclang/Indexing.cpp b/tools/libclang/Indexing.cpp index e35640029e..c1e3378438 100644 --- a/tools/libclang/Indexing.cpp +++ b/tools/libclang/Indexing.cpp @@ -141,7 +141,7 @@ namespace llvm { return LHS == RHS; } }; -} +} // namespace llvm namespace { diff --git a/tools/libclang/IndexingContext.h b/tools/libclang/IndexingContext.h index 4da6aebaf6..5f29e0b4cb 100644 --- a/tools/libclang/IndexingContext.h +++ b/tools/libclang/IndexingContext.h @@ -519,6 +519,7 @@ inline T *ScratchAlloc::allocate() { return IdxCtx.StrScratch.Allocate<T>(); } -}} // end clang::cxindex +} // namespace cxindex +} // namespace clang #endif |