summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/Decl.cpp3
-rw-r--r--clang/lib/AST/DeclBase.cpp1
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/Decl.cpp b/clang/lib/AST/Decl.cpp
index b3f19a25b86..8521b9b44ea 100644
--- a/clang/lib/AST/Decl.cpp
+++ b/clang/lib/AST/Decl.cpp
@@ -314,8 +314,7 @@ TagDecl* TagDecl::getDefinition(ASTContext& C) const {
RecordDecl::RecordDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L,
IdentifierInfo *Id)
- : TagDecl(DK, TK, DC, L, Id, 0), DeclContext(DK) {
-
+ : TagDecl(DK, TK, DC, L, Id, 0) {
HasFlexibleArrayMember = false;
AnonymousStructOrUnion = false;
assert(classof(static_cast<Decl*>(this)) && "Invalid Kind!");
diff --git a/clang/lib/AST/DeclBase.cpp b/clang/lib/AST/DeclBase.cpp
index 49890144a95..83f8fa411f9 100644
--- a/clang/lib/AST/DeclBase.cpp
+++ b/clang/lib/AST/DeclBase.cpp
@@ -579,6 +579,7 @@ DeclContext::lookup(DeclarationName Name) const {
const DeclContext *DeclContext::getLookupContext() const {
const DeclContext *Ctx = this;
+ // Skip through transparent contexts.
while (Ctx->isTransparentContext())
Ctx = Ctx->getParent();
return Ctx;
OpenPOWER on IntegriCloud