diff options
author | Aaron Ballman <aaron@aaronballman.com> | 2013-02-22 00:15:31 +0000 |
---|---|---|
committer | Aaron Ballman <aaron@aaronballman.com> | 2013-02-22 00:15:31 +0000 |
commit | c9088966de61c4958efbb7b635dad78d779ac6e6 (patch) | |
tree | 394998c2a302c77ffa6016eb7b959e43e3de19a7 | |
parent | 94236e7393d5cd4acbc5f0b503d23bbe78d9aeec (diff) |
Removing has_getDecl (added in r175532). It cause a build break for MSVC, and was not yet being used in the codebase. If we start using std::enable_if, we can look into resurrecting the idea in a more portable fashion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175837 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/ASTMatchers/ASTMatchersInternal.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/include/clang/ASTMatchers/ASTMatchersInternal.h b/include/clang/ASTMatchers/ASTMatchersInternal.h index cc4edacf42..e18e325942 100644 --- a/include/clang/ASTMatchers/ASTMatchersInternal.h +++ b/include/clang/ASTMatchers/ASTMatchersInternal.h @@ -353,18 +353,6 @@ inline Matcher<T> makeMatcher(MatcherInterface<T> *Implementation) { return Matcher<T>(Implementation); } -/// \brief Metafunction to determine if type T has a member called getDecl. -template <typename T> struct has_getDecl { - typedef char yes[1]; - typedef char no[2]; - - template <typename TestType> - static yes &test(char[sizeof(&TestType::getDecl)]); - template <typename> static no &test(...); - - static bool const value = sizeof(test<T>(0)) == sizeof(yes); -}; - /// \brief Matches declarations for QualType and CallExpr. /// /// Type argument DeclMatcherT is required by PolymorphicMatcherWithParam1 but @@ -388,9 +376,8 @@ private: /// \brief If getDecl exists as a member of U, returns whether the inner /// matcher matches Node.getDecl(). template <typename U> - bool matchesSpecialized( - const U &Node, ASTMatchFinder *Finder, BoundNodesTreeBuilder *Builder, - typename llvm::enable_if<has_getDecl<U>, int>::type = 0) const { + bool matchesSpecialized(const U &Node, ASTMatchFinder *Finder, + BoundNodesTreeBuilder *Builder) const { return matchesDecl(Node.getDecl(), Finder, Builder); } |