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)
|
if (!Within)
|
||||||
S->LookupName(R, S->TUScope);
|
S->LookupName(R, S->TUScope);
|
||||||
else {
|
else {
|
||||||
if (const clang::TagDecl* TD = dyn_cast<clang::TagDecl>(Within)) {
|
auto primaryWithin = Within->getPrimaryContext();
|
||||||
if (!TD->getDefinition()) {
|
if (!primaryWithin) {
|
||||||
// No definition, no lookup result.
|
// No definition, no lookup result.
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
S->LookupQualifiedName(R, const_cast<DeclContext*>(Within));
|
S->LookupQualifiedName(R, const_cast<DeclContext*>(primaryWithin));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (R.empty())
|
if (R.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user