================
@@ -108,6 +113,16 @@ static std::string GetEnclosingDeclContextSignature(const
Decl *D) {
// the method.
DeclName = ND->getQualifiedNameAsString();
break;
+ case Decl::Field:
+ case Decl::Var:
+ case Decl::ParmVar:
+ if (const DeclContext *DC = D->getDeclContext())
+ return GetEnclosingDeclContextSignature(Decl::castFromDeclContext(DC));
+ break;
+ case Decl::ObjCIvar:
+ if (auto *Interface = cast<ObjCIvarDecl>(ND)->getContainingInterface())
+ return GetEnclosingDeclContextSignature(Interface);
+ break;
----------------
NagyDonat wrote:
Previously this method always returned the _name_ of the thing declared at `D`
in its most qualified form (full signature for things that could be overloaded,
qualified name otherwise).
Now these new branches act differently: they return the name of the thing that
_contains_ the thing declared at `D`.
You should avoid this unnatural generalization of this function, especially
since (as far as I see) it is easy to avoid this.
https://github.com/llvm/llvm-project/pull/214102
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits