[clang-tools-extra] r268264 - [clang-tidy] Cleaning namespaces to be more consistant across checkers.

Etienne Bergeron via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 11:00:30 PDT 2016


Author: etienneb
Date: Mon May  2 13:00:29 2016
New Revision: 268264

URL: http://llvm.org/viewvc/llvm-project?rev=268264&view=rev
Log:
[clang-tidy] Cleaning namespaces to be more consistant across checkers.

Summary:
The goal of the patch is to bring checkers in their appropriate namespace.
This path doesn't change any behavior.

Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D19811

Modified:
    clang-tools-extra/trunk/clang-tidy/cert/CERTTidyModule.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp
    clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp
    clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/MoveConstantArgumentCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.cpp
    clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.h
    clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/UndelegatedConstructor.cpp
    clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.cpp
    clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.h
    clang-tools-extra/trunk/clang-tidy/misc/UnusedRAIICheck.cpp
    clang-tools-extra/trunk/clang-tidy/modernize/RawStringLiteralCheck.h
    clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
    clang-tools-extra/trunk/clang-tidy/performance/ForRangeCopyCheck.cpp
    clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp
    clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp
    clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.h
    clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
    clang-tools-extra/trunk/clang-tidy/readability/RedundantStringCStrCheck.cpp
    clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp
    clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h

Modified: clang-tools-extra/trunk/clang-tidy/cert/CERTTidyModule.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cert/CERTTidyModule.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cert/CERTTidyModule.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cert/CERTTidyModule.cpp Mon May  2 13:00:29 2016
@@ -40,7 +40,7 @@ public:
     CheckFactories.registerCheck<google::build::UnnamedNamespaceInHeaderCheck>(
         "cert-dcl59-cpp");
     // OOP
-    CheckFactories.registerCheck<MoveConstructorInitCheck>(
+    CheckFactories.registerCheck<misc::MoveConstructorInitCheck>(
         "cert-oop11-cpp");
     // ERR
     CheckFactories.registerCheck<SetLongJmpCheck>(
@@ -49,12 +49,12 @@ public:
         "cert-err58-cpp");
     CheckFactories.registerCheck<ThrownExceptionTypeCheck>(
         "cert-err60-cpp");
-    CheckFactories.registerCheck<ThrowByValueCatchByReferenceCheck>(
+    CheckFactories.registerCheck<misc::ThrowByValueCatchByReferenceCheck>(
         "cert-err61-cpp");
 
     // C checkers
     // DCL
-    CheckFactories.registerCheck<StaticAssertCheck>(
+    CheckFactories.registerCheck<misc::StaticAssertCheck>(
         "cert-dcl03-c");
     // ENV
     CheckFactories.registerCheck<CommandProcessorCheck>(
@@ -63,7 +63,7 @@ public:
     CheckFactories.registerCheck<FloatLoopCounter>(
         "cert-flp30-c");
     // FIO
-    CheckFactories.registerCheck<NonCopyableObjectsCheck>(
+    CheckFactories.registerCheck<misc::NonCopyableObjectsCheck>(
         "cert-fio38-c");
     // ERR
     CheckFactories.registerCheck<StrToNumCheck>(

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 AST_MATCHER_P(CXXForRangeStmt, hasRangeBeginEndStmt,
               ast_matchers::internal::Matcher<DeclStmt>, InnerMatcher) {
@@ -74,5 +75,6 @@ void ProBoundsArrayToPointerDecayCheck::
                                   "an explicit cast instead");
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsArrayToPointerDecayCheck.h Mon May  2 13:00:29 2016
@@ -14,7 +14,8 @@
 
 namespace clang {
 namespace tidy {
-
+namespace cppcoreguidelines {
+	
 /// This check flags all array to pointer decays
 ///
 /// For the user-facing documentation see:
@@ -27,6 +28,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.cpp Mon May  2 13:00:29 2016
@@ -17,6 +17,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 ProBoundsConstantArrayIndexCheck::ProBoundsConstantArrayIndexCheck(
     StringRef Name, ClangTidyContext *Context)
@@ -128,5 +129,6 @@ void ProBoundsConstantArrayIndexCheck::c
   }
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsConstantArrayIndexCheck.h Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 /// This checks that all array subscriptions on static arrays and std::arrays
 /// have a constant index and are within bounds
@@ -34,6 +35,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 void ProBoundsPointerArithmeticCheck::registerMatchers(MatchFinder *Finder) {
   if (!getLangOpts().CPlusPlus)
@@ -53,5 +54,6 @@ ProBoundsPointerArithmeticCheck::check(c
   diag(MatchedExpr->getExprLoc(), "do not use pointer arithmetic");
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProBoundsPointerArithmeticCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 /// Flags all kinds of pointer arithmetic that have result of pointer type, i.e.
 /// +, -, +=, -=, ++, --. In addition, the [] operator on pointers (not on arrays) is flagged.
@@ -28,6 +29,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.cpp Mon May  2 13:00:29 2016
@@ -15,7 +15,8 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
-
+namespace cppcoreguidelines {
+	
 void ProTypeConstCastCheck::registerMatchers(MatchFinder *Finder) {
   if (!getLangOpts().CPlusPlus)
     return;
@@ -28,5 +29,6 @@ void ProTypeConstCastCheck::check(const
   diag(MatchedCast->getOperatorLoc(), "do not use const_cast");
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeConstCastCheck.h Mon May  2 13:00:29 2016
@@ -14,7 +14,8 @@
 
 namespace clang {
 namespace tidy {
-
+namespace cppcoreguidelines {
+	
 /// This check flags all instances of const_cast
 ///
 /// For the user-facing documentation see:
@@ -27,6 +28,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.cpp Mon May  2 13:00:29 2016
@@ -16,6 +16,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 static bool needsConstCast(QualType SourceType, QualType DestType) {
   SourceType = SourceType.getNonReferenceType();
@@ -103,5 +104,6 @@ void ProTypeCstyleCastCheck::check(const
   }
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeCstyleCastCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 /// This check flags all use of C-style casts that perform a static_cast
 /// downcast, const_cast, or reinterpret_cast.
@@ -28,6 +29,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 void ProTypeReinterpretCastCheck::registerMatchers(MatchFinder *Finder) {
   if (!getLangOpts().CPlusPlus)
@@ -30,5 +31,6 @@ void ProTypeReinterpretCastCheck::check(
   diag(MatchedCast->getOperatorLoc(), "do not use reinterpret_cast");
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeReinterpretCastCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 /// Flags all occurrences of reinterpret_cast
 ///
@@ -27,6 +28,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.cpp Mon May  2 13:00:29 2016
@@ -15,7 +15,8 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
-
+namespace cppcoreguidelines {
+  
 void ProTypeStaticCastDowncastCheck::registerMatchers(MatchFinder *Finder) {
   if (!getLangOpts().CPlusPlus)
     return;
@@ -48,5 +49,6 @@ void ProTypeStaticCastDowncastCheck::che
          "do not use static_cast to downcast from a base to a derived class");
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeStaticCastDowncastCheck.h Mon May  2 13:00:29 2016
@@ -14,7 +14,8 @@
 
 namespace clang {
 namespace tidy {
-
+namespace cppcoreguidelines {
+	
 /// Checks for usages of static_cast, where a base class is downcasted to a derived class.
 ///
 /// For the user-facing documentation see:
@@ -27,6 +28,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 void ProTypeUnionAccessCheck::registerMatchers(MatchFinder *Finder) {
   if (!getLangOpts().CPlusPlus)
@@ -28,6 +29,7 @@ void ProTypeUnionAccessCheck::check(cons
   diag(Matched->getMemberLoc(), "do not access members of unions; use (boost::)variant instead");
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeUnionAccessCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 /// This check flags all access to members of unions.
 /// Access to a union as a whole (e.g. passing to a function) is not flagged.
@@ -28,6 +29,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 const internal::VariadicDynCastAllOfMatcher<Stmt, VAArgExpr> vAArgExpr;
 
@@ -72,5 +73,6 @@ void ProTypeVarargCheck::check(const Mat
   }
 }
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/ProTypeVarargCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace cppcoreguidelines {
 
 /// This check flags all calls to c-style variadic functions and all use
 /// of va_arg.
@@ -28,6 +29,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace cppcoreguidelines
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.cpp Mon May  2 13:00:29 2016
@@ -21,6 +21,9 @@
 using namespace clang::ast_matchers;
 
 namespace clang {
+namespace tidy {
+namespace misc {
+
 namespace {
 
 AST_MATCHER_P(Expr, hasSideEffect, bool, CheckFunctionCalls) {
@@ -66,8 +69,6 @@ AST_MATCHER_P(Expr, hasSideEffect, bool,
 
 } // namespace
 
-namespace tidy {
-
 AssertSideEffectCheck::AssertSideEffectCheck(StringRef Name,
                                              ClangTidyContext *Context)
     : ClangTidyCheck(Name, Context),
@@ -121,5 +122,6 @@ void AssertSideEffectCheck::check(const
   diag(Loc, "found %0() with side effect") << AssertMacroName;
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/AssertSideEffectCheck.h Mon May  2 13:00:29 2016
@@ -17,6 +17,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 /// Finds `assert()` with side effect.
 ///
@@ -44,6 +45,7 @@ private:
   SmallVector<StringRef, 5> AssertMacros;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/BoolPointerImplicitConversionCheck.cpp Mon May  2 13:00:29 2016
@@ -12,6 +12,9 @@
 using namespace clang::ast_matchers;
 
 namespace clang {
+namespace tidy {
+namespace misc {
+
 namespace {
 
 AST_MATCHER(CastExpr, isPointerToBoolean) {
@@ -20,9 +23,6 @@ AST_MATCHER(CastExpr, isPointerToBoolean
 
 } // namespace
 
-namespace tidy {
-namespace misc {
-
 void BoolPointerImplicitConversionCheck::registerMatchers(MatchFinder *Finder) {
   // Look for ifs that have an implicit bool* to bool conversion in the
   // condition. Filter negations.

Modified: clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/IncorrectRoundings.cpp Mon May  2 13:00:29 2016
@@ -14,8 +14,13 @@
 #include "clang/ASTMatchers/ASTMatchers.h"
 #include "clang/Lex/Lexer.h"
 
+using namespace clang::ast_matchers;
+
 namespace clang {
-namespace ast_matchers {
+namespace tidy {
+namespace misc {
+
+namespace {
 AST_MATCHER(FloatingLiteral, floatHalf) {
   const auto &literal = Node.getValue();
   if ((&Node.getSemantics()) == &llvm::APFloat::IEEEsingle)
@@ -24,14 +29,9 @@ AST_MATCHER(FloatingLiteral, floatHalf)
     return literal.convertToDouble() == 0.5;
   return false;
 }
-} // namespace ast_matchers
-} // namespace clang
+} // namespace
 
-using namespace clang::ast_matchers;
 
-namespace clang {
-namespace tidy {
-namespace misc {
 void IncorrectRoundings::registerMatchers(MatchFinder *MatchFinder) {
   // Match a floating literal with value 0.5.
   auto FloatHalf = floatLiteral(floatHalf());

Modified: clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.cpp Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 namespace {
 class MacroParenthesesPPCallbacks : public PPCallbacks {
@@ -198,5 +199,6 @@ void MacroParenthesesCheck::registerPPCa
           &Compiler.getPreprocessor(), this));
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/MacroParenthesesCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 /// Finds macros that can have unexpected behaviour due to missing parentheses.
 ///
@@ -35,6 +36,7 @@ public:
   void registerPPCallbacks(CompilerInstance &Compiler) override;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/MoveConstantArgumentCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/MoveConstantArgumentCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/MoveConstantArgumentCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/MoveConstantArgumentCheck.cpp Mon May  2 13:00:29 2016
@@ -9,14 +9,14 @@
 
 #include "MoveConstantArgumentCheck.h"
 
-#include <clang/Lex/Lexer.h>
+#include "clang/Lex/Lexer.h"
+
+using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
 namespace misc {
 
-using namespace ast_matchers;
-
 void MoveConstantArgumentCheck::registerMatchers(MatchFinder *Finder) {
   if (!getLangOpts().CPlusPlus)
     return;

Modified: clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.cpp Mon May  2 13:00:29 2016
@@ -19,6 +19,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 namespace {
 
@@ -175,5 +176,6 @@ void MoveConstructorInitCheck::storeOpti
   Options.store(Opts, "IncludeStyle", IncludeSorter::toString(IncludeStyle));
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/MoveConstructorInitCheck.h Mon May  2 13:00:29 2016
@@ -17,6 +17,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 /// The check flags user-defined move constructors that have a ctor-initializer
 /// initializing a member or base class through a copy constructor instead of a
@@ -42,6 +43,7 @@ private:
   const bool UseCERTSemantics;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/NewDeleteOverloadsCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/NewDeleteOverloadsCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/NewDeleteOverloadsCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/NewDeleteOverloadsCheck.cpp Mon May  2 13:00:29 2016
@@ -14,7 +14,11 @@
 using namespace clang::ast_matchers;
 
 namespace clang {
+namespace tidy {
+namespace misc {
+
 namespace {
+
 AST_MATCHER(FunctionDecl, isPlacementOverload) {
   bool New;
   switch (Node.getOverloadedOperator()) {
@@ -57,12 +61,7 @@ AST_MATCHER(FunctionDecl, isPlacementOve
 
   return true;
 }
-} // namespace
 
-namespace tidy {
-namespace misc {
-
-namespace {
 OverloadedOperatorKind getCorrespondingOverload(const FunctionDecl *FD) {
   switch (FD->getOverloadedOperator()) {
   default: break;
@@ -125,6 +124,7 @@ bool hasCorrespondingOverloadInBaseClass
 
   return false;
 }
+
 } // anonymous namespace
 
 void NewDeleteOverloadsCheck::registerMatchers(MatchFinder *Finder) {

Modified: clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 void NoexceptMoveConstructorCheck::registerMatchers(MatchFinder *Finder) {
   // Only register the matchers for C++11; the functionality currently does not
@@ -67,6 +68,7 @@ void NoexceptMoveConstructorCheck::check
   }
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/NoexceptMoveConstructorCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 /// The check flags user-defined move constructors and assignment operators not
 /// marked with `noexcept` or marked with `noexcept(expr)` where `expr`
@@ -30,6 +31,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,9 @@
 using namespace clang::ast_matchers;
 
 namespace clang {
+namespace tidy {
+namespace misc {
+
 namespace {
 // FIXME: it would be good to make a list that is also user-configurable so that
 // users can add their own elements to the list. However, it may require some
@@ -49,7 +52,6 @@ AST_MATCHER(NamedDecl, isPOSIXType) {
 }
 } // namespace
 
-namespace tidy {
 void NonCopyableObjectsCheck::registerMatchers(MatchFinder *Finder) {
   // There are two ways to get into trouble with objects like FILE *:
   // dereferencing the pointer type to be a non-pointer type, and declaring
@@ -91,6 +93,7 @@ void NonCopyableObjectsCheck::check(cons
         << BD;
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/NonCopyableObjects.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 /// The check flags dereferences and non-pointer declarations of objects that
 /// are not meant to be passed by value, such as C FILE objects.
@@ -25,6 +26,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.cpp Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {  
 
 void SizeofContainerCheck::registerMatchers(MatchFinder *Finder) {
   Finder->addMatcher(
@@ -43,6 +44,7 @@ void SizeofContainerCheck::check(const M
                                   "container; did you mean .size()?");
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/SizeofContainerCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 /// Find usages of sizeof on expressions of STL container types. Most likely the
 /// user wanted to use `.size()` instead.
@@ -28,6 +29,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.cpp Mon May  2 13:00:29 2016
@@ -22,6 +22,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {  
 
 StaticAssertCheck::StaticAssertCheck(StringRef Name, ClangTidyContext *Context)
     : ClangTidyCheck(Name, Context) {}
@@ -164,5 +165,6 @@ SourceLocation StaticAssertCheck::getLas
   return Token.getLocation();
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/StaticAssertCheck.h Mon May  2 13:00:29 2016
@@ -16,6 +16,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {	
 
 /// Replaces `assert()` with `static_assert()` if the condition is evaluatable
 /// at compile time.
@@ -33,6 +34,7 @@ private:
                                  SourceLocation AssertLoc);
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.cpp Mon May  2 13:00:29 2016
@@ -16,6 +16,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {  
 
 void StringIntegerAssignmentCheck::registerMatchers(MatchFinder *Finder) {
   if (!getLangOpts().CPlusPlus)
@@ -81,5 +82,6 @@ void StringIntegerAssignmentCheck::check
   }
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/StringIntegerAssignmentCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {	
 
 /// Finds instances where an integer is assigned to a string.
 ///
@@ -27,6 +28,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.cpp Mon May  2 13:00:29 2016
@@ -16,6 +16,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {  
 
 ThrowByValueCatchByReferenceCheck::ThrowByValueCatchByReferenceCheck(
     StringRef Name, ClangTidyContext *Context)
@@ -155,5 +156,6 @@ void ThrowByValueCatchByReferenceCheck::
   }
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/ThrowByValueCatchByReferenceCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 ///\brief checks for locations that do not throw by value
 // or catch by reference.
@@ -43,6 +44,7 @@ private:
   const bool CheckAnonymousTemporaries;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/UndelegatedConstructor.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/UndelegatedConstructor.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/UndelegatedConstructor.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/UndelegatedConstructor.cpp Mon May  2 13:00:29 2016
@@ -14,6 +14,8 @@
 using namespace clang::ast_matchers;
 
 namespace clang {
+namespace tidy {
+namespace misc {
 
 namespace {
 AST_MATCHER_P(Stmt, ignoringTemporaryExpr,
@@ -46,9 +48,6 @@ AST_MATCHER_P(CXXRecordDecl, baseOfBound
 }
 } // namespace
 
-namespace tidy {
-namespace misc {
-
 void UndelegatedConstructorCheck::registerMatchers(MatchFinder *Finder) {
   // We look for calls to constructors of the same type in constructors. To do
   // this we have to look through a variety of nodes that occur in the path,

Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.cpp Mon May  2 13:00:29 2016
@@ -16,6 +16,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {
 
 void UnusedAliasDeclsCheck::registerMatchers(MatchFinder *Finder) {
   // Only register the matchers for C++11; the functionality currently does not
@@ -58,5 +59,6 @@ void UnusedAliasDeclsCheck::onEndOfTrans
   }
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/UnusedAliasDeclsCheck.h Mon May  2 13:00:29 2016
@@ -15,6 +15,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {	
 
 /// Finds unused namespace alias declarations.
 class UnusedAliasDeclsCheck : public ClangTidyCheck {
@@ -29,6 +30,7 @@ private:
   llvm::DenseMap<const NamedDecl *, CharSourceRange> FoundDecls;
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.cpp Mon May  2 13:00:29 2016
@@ -16,6 +16,8 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace misc {
+
 namespace {
 bool isOverrideMethod(const FunctionDecl *Function) {
   if (const auto *MD = dyn_cast<CXXMethodDecl>(Function))
@@ -120,5 +122,6 @@ void UnusedParametersCheck::check(const
   }
 }
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/UnusedParametersCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace misc {	
 
 /// Finds unused parameters and fixes them, so that `-Wunused-parameter` can be
 /// turned on.
@@ -30,6 +31,7 @@ private:
                         const FunctionDecl *Function, unsigned ParamIndex);
 };
 
+} // namespace misc
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/misc/UnusedRAIICheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/misc/UnusedRAIICheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/misc/UnusedRAIICheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/misc/UnusedRAIICheck.cpp Mon May  2 13:00:29 2016
@@ -14,6 +14,9 @@
 using namespace clang::ast_matchers;
 
 namespace clang {
+namespace tidy {
+namespace misc {
+
 namespace {
 AST_MATCHER(CXXRecordDecl, hasNonTrivialDestructor) {
   // TODO: If the dtor is there but empty we don't want to warn either.
@@ -21,9 +24,6 @@ AST_MATCHER(CXXRecordDecl, hasNonTrivial
 }
 } // namespace
 
-namespace tidy {
-namespace misc {
-
 void UnusedRAIICheck::registerMatchers(MatchFinder *Finder) {
   // Only register the matchers for C++; the functionality currently does not
   // provide any benefit to other languages, despite being benign.

Modified: clang-tools-extra/trunk/clang-tidy/modernize/RawStringLiteralCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/RawStringLiteralCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/RawStringLiteralCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/modernize/RawStringLiteralCheck.h Mon May  2 13:00:29 2016
@@ -11,7 +11,6 @@
 #define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_MODERNIZE_RAW_STRING_LITERAL_H
 
 #include "../ClangTidy.h"
-//#include <string>
 
 namespace clang {
 namespace tidy {

Modified: clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/modernize/RedundantVoidArgCheck.cpp Mon May  2 13:00:29 2016
@@ -14,6 +14,8 @@
 using namespace clang::ast_matchers;
 
 namespace clang {
+namespace tidy {
+namespace modernize {
 
 namespace {
 
@@ -42,9 +44,6 @@ const char LambdaId[] = "lambda";
 
 } // namespace
 
-namespace tidy {
-namespace modernize {
-
 void RedundantVoidArgCheck::registerMatchers(MatchFinder *Finder) {
   Finder->addMatcher(functionDecl(parameterCountIs(0), unless(isImplicit()),
                                   unless(isExternC()))

Modified: clang-tools-extra/trunk/clang-tidy/performance/ForRangeCopyCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/performance/ForRangeCopyCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/performance/ForRangeCopyCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/performance/ForRangeCopyCheck.cpp Mon May  2 13:00:29 2016
@@ -12,12 +12,12 @@
 #include "../utils/FixItHintUtils.h"
 #include "../utils/TypeTraits.h"
 
+using namespace clang::ast_matchers;
+
 namespace clang {
 namespace tidy {
 namespace performance {
 
-using namespace ::clang::ast_matchers;
-
 ForRangeCopyCheck::ForRangeCopyCheck(StringRef Name, ClangTidyContext *Context)
     : ClangTidyCheck(Name, Context),
       WarnOnAllAutoCopies(Options.get("WarnOnAllAutoCopies", 0)) {}

Modified: clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/performance/ImplicitCastInLoopCheck.cpp Mon May  2 13:00:29 2016
@@ -15,10 +15,9 @@
 #include "clang/ASTMatchers/ASTMatchers.h"
 #include "clang/Lex/Lexer.h"
 
-namespace clang {
-
-using namespace ast_matchers;
+using namespace clang::ast_matchers;
 
+namespace clang {
 namespace tidy {
 namespace performance {
 

Modified: clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.cpp Mon May  2 13:00:29 2016
@@ -16,6 +16,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace readability {
 
 namespace {
 
@@ -415,5 +416,6 @@ void ImplicitBoolCastCheck::handleCastFr
   }
 }
 
+} // namespace readability
 } // namespace tidy
 } // namespace clang

Modified: clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/ImplicitBoolCastCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace readability {
 
 /// \brief Checks for use of implicit bool casts in expressions.
 ///
@@ -41,6 +42,7 @@ private:
   bool AllowConditionalPointerCasts;
 };
 
+} // namespace readability
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/InconsistentDeclarationParameterNameCheck.cpp Mon May  2 13:00:29 2016
@@ -15,12 +15,12 @@
 #include <functional>
 #include <sstream>
 
+using namespace clang::ast_matchers;
+
 namespace clang {
 namespace tidy {
 namespace readability {
 
-using namespace ast_matchers;
-
 namespace {
 
 AST_MATCHER(FunctionDecl, hasOtherDeclarations) {

Modified: clang-tools-extra/trunk/clang-tidy/readability/RedundantStringCStrCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/RedundantStringCStrCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/RedundantStringCStrCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/RedundantStringCStrCheck.cpp Mon May  2 13:00:29 2016
@@ -14,9 +14,11 @@
 #include "RedundantStringCStrCheck.h"
 #include "clang/Lex/Lexer.h"
 
-namespace clang {
+using namespace clang::ast_matchers;
 
-using namespace ast_matchers;
+namespace clang {
+namespace tidy {
+namespace readability {
 
 namespace {
 
@@ -67,9 +69,6 @@ formatDereference(const ast_matchers::Ma
 
 } // end namespace
 
-namespace tidy {
-namespace readability {
-
 void RedundantStringCStrCheck::registerMatchers(
     ast_matchers::MatchFinder *Finder) {
   // Only register the matchers for C++; the functionality currently does not

Modified: clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.cpp Mon May  2 13:00:29 2016
@@ -16,6 +16,7 @@ using namespace clang::ast_matchers;
 
 namespace clang {
 namespace tidy {
+namespace readability {
 
 void UniqueptrDeleteReleaseCheck::registerMatchers(MatchFinder *Finder) {
   auto IsSusbstituted = qualType(anyOf(
@@ -64,6 +65,7 @@ void UniqueptrDeleteReleaseCheck::check(
              " = nullptr");
 }
 
+} // namespace readability
 } // namespace tidy
 } // namespace clang
 

Modified: clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h?rev=268264&r1=268263&r2=268264&view=diff
==============================================================================
--- clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h (original)
+++ clang-tools-extra/trunk/clang-tidy/readability/UniqueptrDeleteReleaseCheck.h Mon May  2 13:00:29 2016
@@ -14,6 +14,7 @@
 
 namespace clang {
 namespace tidy {
+namespace readability {
 
 /// Flag statements of the form: delete <unique_ptr expr>.release()
 /// and replace them with: <unique_ptr expr> = nullptr
@@ -28,6 +29,7 @@ public:
   void check(const ast_matchers::MatchFinder::MatchResult &Result) override;
 };
 
+} // namespace readability
 } // namespace tidy
 } // namespace clang
 




More information about the cfe-commits mailing list