summaryrefslogtreecommitdiffstats
path: root/include/clang/ASTMatchers/Dynamic/Registry.h
diff options
context:
space:
mode:
authorEugene Zelenko <eugene.zelenko@gmail.com>2016-12-09 00:11:53 +0000
committerEugene Zelenko <eugene.zelenko@gmail.com>2016-12-09 00:11:53 +0000
commit6a643fea5cc7bd7f3bffec675dd62c8e31f4c777 (patch)
treeeda02138676cda0fbef226055573c2729d379002 /include/clang/ASTMatchers/Dynamic/Registry.h
parent848b4ceee68b918ab674a9db5c1277edcfb1a452 (diff)
[AST, ASTMatchers, Basic] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@289160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/ASTMatchers/Dynamic/Registry.h')
-rw-r--r--include/clang/ASTMatchers/Dynamic/Registry.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/include/clang/ASTMatchers/Dynamic/Registry.h b/include/clang/ASTMatchers/Dynamic/Registry.h
index 3808adb11e..7bba95dbff 100644
--- a/include/clang/ASTMatchers/Dynamic/Registry.h
+++ b/include/clang/ASTMatchers/Dynamic/Registry.h
@@ -1,4 +1,4 @@
-//===--- Registry.h - Matcher registry -----*- C++ -*-===//
+//===--- Registry.h - Matcher registry --------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -19,28 +19,36 @@
#include "clang/ASTMatchers/Dynamic/Diagnostics.h"
#include "clang/ASTMatchers/Dynamic/VariantValue.h"
-#include "clang/Basic/LLVM.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringRef.h"
+#include <string>
+#include <utility>
+#include <vector>
namespace clang {
namespace ast_matchers {
namespace dynamic {
namespace internal {
+
class MatcherDescriptor;
-}
+
+} // end namespace internal
typedef const internal::MatcherDescriptor *MatcherCtor;
struct MatcherCompletion {
- MatcherCompletion() {}
+ MatcherCompletion() = default;
MatcherCompletion(StringRef TypedText, StringRef MatcherDecl,
unsigned Specificity)
: TypedText(TypedText), MatcherDecl(MatcherDecl),
Specificity(Specificity) {}
+ bool operator==(const MatcherCompletion &Other) const {
+ return TypedText == Other.TypedText && MatcherDecl == Other.MatcherDecl;
+ }
+
/// \brief The text to type to select this matcher.
std::string TypedText;
@@ -53,14 +61,12 @@ struct MatcherCompletion {
/// matcher that will either always or never match.
/// Such matchers are excluded from code completion results.
unsigned Specificity;
-
- bool operator==(const MatcherCompletion &Other) const {
- return TypedText == Other.TypedText && MatcherDecl == Other.MatcherDecl;
- }
};
class Registry {
public:
+ Registry() = delete;
+
/// \brief Look up a matcher in the registry by name,
///
/// \return An opaque value which may be used to refer to the matcher
@@ -121,13 +127,10 @@ public:
StringRef BindID,
ArrayRef<ParserValue> Args,
Diagnostics *Error);
-
-private:
- Registry() = delete;
};
-} // namespace dynamic
-} // namespace ast_matchers
-} // namespace clang
+} // end namespace dynamic
+} // end namespace ast_matchers
+} // end namespace clang
-#endif // LLVM_CLANG_AST_MATCHERS_DYNAMIC_REGISTRY_H
+#endif // LLVM_CLANG_AST_MATCHERS_DYNAMIC_REGISTRY_H