summaryrefslogtreecommitdiffstats
path: root/lib/AST/DeclCXX.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2016-06-10 11:54:43 +0000
committerClement Courbet <courbet@google.com>2016-06-10 11:54:43 +0000
commit7975d6ddc34c5a0eeeb57b748e235cd48b12b258 (patch)
tree444aaec31195b6ae549f905bca6339de0f4b5559 /lib/AST/DeclCXX.cpp
parent22a3dfea02651451188643abeb6a720e655d80ae (diff)
[ASTMatchers] New forEachOverriden matcher.
Matches methods overridden by the given method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@272386 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclCXX.cpp')
-rw-r--r--lib/AST/DeclCXX.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/AST/DeclCXX.cpp b/lib/AST/DeclCXX.cpp
index 2a1fac8509..83c7db88f4 100644
--- a/lib/AST/DeclCXX.cpp
+++ b/lib/AST/DeclCXX.cpp
@@ -1635,6 +1635,13 @@ unsigned CXXMethodDecl::size_overridden_methods() const {
return getASTContext().overridden_methods_size(this);
}
+CXXMethodDecl::overridden_method_range
+CXXMethodDecl::overridden_methods() const {
+ if (isa<CXXConstructorDecl>(this))
+ return overridden_method_range(nullptr, nullptr);
+ return getASTContext().overridden_methods(this);
+}
+
QualType CXXMethodDecl::getThisType(ASTContext &C) const {
// C++ 9.3.2p1: The type of this in a member function of a class X is X*.
// If the member function is declared const, the type of this is const X*,