We must pass the primary decl context to Sema's LookupQualifiedName [ROOT-7737].
This is guarded by an assert in Sema::LookupQualifiedName.
This commit is contained in:
parent
fdbc4b985c
commit
32bd423d59
@ -1352,13 +1352,12 @@ namespace utils {
|
||||
if (!Within)
|
||||
S->LookupName(R, S->TUScope);
|
||||
else {
|
||||
if (const clang::TagDecl* TD = dyn_cast<clang::TagDecl>(Within)) {
|
||||
if (!TD->getDefinition()) {
|
||||
auto primaryWithin = Within->getPrimaryContext();
|
||||
if (!primaryWithin) {
|
||||
// No definition, no lookup result.
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
S->LookupQualifiedName(R, const_cast<DeclContext*>(Within));
|
||||
S->LookupQualifiedName(R, const_cast<DeclContext*>(primaryWithin));
|
||||
}
|
||||
|
||||
if (R.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user