diff options
Diffstat (limited to 'lib/AST/Decl.cpp')
-rw-r--r-- | lib/AST/Decl.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 321ccf34f9..15a20bd050 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -491,6 +491,11 @@ void RecordDecl::Destroy(ASTContext& C) { TagDecl::Destroy(C); } +bool RecordDecl::isInjectedClassName() const { + return isImplicit() && getDeclName() && getDeclContext()->isRecord() && + cast<RecordDecl>(getDeclContext())->getDeclName() == getDeclName(); +} + /// completeDefinition - Notes that the definition of this type is now /// complete. void RecordDecl::completeDefinition(ASTContext& C) { |