diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-11 20:15:17 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-11 20:15:17 +0000 |
commit | 9f185076dc8b79c8240b20a8746da96beb3f147b (patch) | |
tree | d18d41a3efaa8c75fcae701b6c252b3294899012 /include | |
parent | d5d6778fb91d018cbd57456cae71289640ea8e66 (diff) |
Tweak the semantics of FunctionDecl::isOutOfLine to consider an
instantiation of a member function template or member function of a
class template to be out-of-line if the definition of that function
template or member function was defined out-of-line. This ensures that
we get the correct linkage for explicit instantiations of out-of-line
definitions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81562 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/clang/AST/Decl.h | 4 | ||||
-rw-r--r-- | include/clang/AST/DeclCXX.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index ee3ddb09aa..01276bae1d 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -1137,6 +1137,10 @@ public: /// represents. void setTemplateSpecializationKind(TemplateSpecializationKind TSK); + /// \brief Determine whether this is or was instantiated from an out-of-line + /// definition of a member function. + bool isOutOfLine() const; + // Implement isa/cast/dyncast/etc. static bool classof(const Decl *D) { return D->getKind() >= FunctionFirst && D->getKind() <= FunctionLast; diff --git a/include/clang/AST/DeclCXX.h b/include/clang/AST/DeclCXX.h index 23da3e0283..7fd7ee6a3d 100644 --- a/include/clang/AST/DeclCXX.h +++ b/include/clang/AST/DeclCXX.h @@ -757,7 +757,7 @@ public: return isVirtualAsWritten() || (begin_overridden_methods() != end_overridden_methods()); } - + /// void addOverriddenMethod(const CXXMethodDecl *MD); |