Lines Matching defs:CurContext
69 // Synthesize a DeclContext for TargetNS from CurContext. TargetNS must be empty
71 // Returns std::nullopt if TargetNS is not a prefix of CurContext.
73 findContextForNS(llvm::StringRef TargetNS, const DeclContext *CurContext) {
76 CurContext = CurContext->getEnclosingNamespaceContext();
79 while (!CurContext->isTranslationUnit())
80 CurContext = CurContext->getParent();
81 return CurContext;
83 // Otherwise we need to drop any trailing namespaces from CurContext until
86 CurContext->isNamespace()
87 ? llvm::cast<NamespaceDecl>(CurContext)->getQualifiedNameAsString()
98 CurContext = CurContext->getParent();
104 return CurContext;