of that field. Otherwise, we can end up building and later trying to
instantiate a dependent member initializer that will fail at
instantiation time.
Unfortunately, I've only managed to trigger this bug with very large
sources, so there's no test case :(
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@118306
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned NumArgs, SourceLocation IdLoc,
SourceLocation LParenLoc,
SourceLocation RParenLoc) {
+ if (Member->isInvalidDecl())
+ return true;
+
// Diagnose value-uses of fields to initialize themselves, e.g.
// foo(foo)
// where foo is not also a parameter to the constructor.
}
- if (Member->isInvalidDecl())
- return true;
-
// Initialize the member.
InitializedEntity MemberEntity =
InitializedEntity::InitializeMember(Member, 0);