diff options
Diffstat (limited to 'clang-tools-extra/clang-tidy/modernize')
-rw-r--r-- | clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp | 2 | ||||
-rw-r--r-- | clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp index 3aab1693fa8..1ab73d50c30 100644 --- a/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/PassByValueCheck.cpp @@ -23,6 +23,7 @@ namespace clang { namespace tidy { namespace modernize { +namespace { /// \brief Matches move-constructible classes. /// /// Given @@ -44,6 +45,7 @@ AST_MATCHER(CXXRecordDecl, isMoveConstructible) { } return false; } +} // namespace static TypeMatcher constRefType() { return lValueReferenceType(pointee(isConstQualified())); diff --git a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp index c4b371fcdf5..04ecf212873 100644 --- a/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp +++ b/clang-tools-extra/clang-tidy/modernize/ReplaceAutoPtrCheck.cpp @@ -21,6 +21,7 @@ namespace clang { namespace tidy { namespace modernize { +namespace { static const char AutoPtrTokenId[] = "AutoPrTokenId"; static const char AutoPtrOwnershipTransferId[] = "AutoPtrOwnershipTransferId"; @@ -69,6 +70,8 @@ AST_MATCHER(Decl, isFromStdNamespace) { return (Info && Info->isStr("std")); } +} // namespace + ReplaceAutoPtrCheck::ReplaceAutoPtrCheck(StringRef Name, ClangTidyContext *Context) : ClangTidyCheck(Name, Context), |