Home
last modified time | relevance | path

Searched refs:NamespaceDecl (Results 1 – 25 of 157) sorted by relevance

1234567

/llvm-project-15.0.7/clang/lib/Tooling/Refactoring/
H A DLookup.cpp29 static llvm::SmallVector<const NamespaceDecl *, 4>
31 llvm::SmallVector<const NamespaceDecl *, 4> Namespaces; in getAllNamedNamespaces()
34 while (Context && (!isa<NamespaceDecl>(Context) || in getAllNamedNamespaces()
35 cast<NamespaceDecl>(Context)->isAnonymousNamespace())) in getAllNamedNamespaces()
41 Namespaces.push_back(cast<NamespaceDecl>(Context)); in getAllNamedNamespaces()
56 llvm::SmallVector<const NamespaceDecl *, 4> FromNamespaces = in usingFromDifferentCanonicalNamespace()
58 llvm::SmallVector<const NamespaceDecl *, 4> UseNamespaces = in usingFromDifferentCanonicalNamespace()
77 if (cast<NamespaceDecl>(*FromIter)->getDeclName() == in usingFromDifferentCanonicalNamespace()
78 cast<NamespaceDecl>(*UseIter)->getDeclName()) in usingFromDifferentCanonicalNamespace()
89 while (DeclA && !isa<NamespaceDecl>(DeclA)) in getBestNamespaceSubstr()
[all …]
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/modernize/
H A DConcatNestedNamespacesCheck.cpp25 static bool anonymousOrInlineNamespace(const NamespaceDecl &ND) { in anonymousOrInlineNamespace()
29 static bool singleNamedNamespaceChild(const NamespaceDecl &ND) { in singleNamedNamespaceChild()
30 NamespaceDecl::decl_range Decls = ND.decls(); in singleNamedNamespaceChild()
34 const auto *ChildNamespace = dyn_cast<const NamespaceDecl>(*Decls.begin()); in singleNamedNamespaceChild()
56 [&Result](const NamespaceDecl *ND) { in concatNamespaces()
79 const NamespaceDecl &ND = *Result.Nodes.getNodeAs<NamespaceDecl>("namespace"); in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/cert/
H A DDontModifyStdNamespaceCheck.cpp106 static const NamespaceDecl *getTopLevelLexicalNamespaceDecl(const Decl *D) { in getTopLevelLexicalNamespaceDecl()
107 const NamespaceDecl *LastNS = nullptr; in getTopLevelLexicalNamespaceDecl()
109 if (const auto *NS = dyn_cast<NamespaceDecl>(D)) in getTopLevelLexicalNamespaceDecl()
119 const auto *NS = Result.Nodes.getNodeAs<NamespaceDecl>("nmspc"); in check()
128 if (const NamespaceDecl *LexNS = getTopLevelLexicalNamespaceDecl(D)) { in check()
/llvm-project-15.0.7/clang/lib/AST/
H A DComparisonCategories.cpp89 static const NamespaceDecl *lookupStdNamespace(const ASTContext &Ctx, in lookupStdNamespace()
90 NamespaceDecl *&StdNS) { in lookupStdNamespace()
95 StdNS = dyn_cast<NamespaceDecl>(Lookup.front()); in lookupStdNamespace()
101 const NamespaceDecl *StdNS, in lookupCXXRecordDecl()
117 if (const NamespaceDecl *NS = lookupStdNamespace(Ctx, StdNS)) in lookupInfo()
H A DQualTypeNames.cpp32 const NamespaceDecl *Namesp,
194 if (const auto *NS = dyn_cast<NamespaceDecl>(DC)) { in createOuterNNS()
197 NS = dyn_cast<NamespaceDecl>(NS->getDeclContext()); in createOuterNNS()
275 const auto *OuterNS = dyn_cast_or_null<NamespaceDecl>(DC); in createNestedNameSpecifierForScopeOf()
293 OuterNS = dyn_cast<NamespaceDecl>(Decl); in createNestedNameSpecifierForScopeOf()
344 const NamespaceDecl *Namespace, in createNestedNameSpecifier()
348 Namespace = dyn_cast<NamespaceDecl>(Namespace->getDeclContext()); in createNestedNameSpecifier()
H A DNestedNameSpecifier.cpp74 const NamespaceDecl *NS) { in Create()
83 Mockup.Specifier = const_cast<NamespaceDecl *>(NS); in Create()
155 return isa<NamespaceDecl>(ND) ? Namespace : NamespaceAlias; in getKind()
169 NamespaceDecl *NestedNameSpecifier::getAsNamespace() const { in getAsNamespace()
171 return dyn_cast<NamespaceDecl>(static_cast<NamedDecl *>(Specifier)); in getAsNamespace()
589 NamespaceDecl *Namespace, in Extend()
H A DDeclCXX.cpp2846 if (auto *NS = dyn_cast_or_null<NamespaceDecl>(Used)) in Create()
2860 NamespaceDecl *UsingDirectiveDecl::getNominatedNamespace() { in getNominatedNamespace()
2863 return cast_or_null<NamespaceDecl>(NominatedNamespace); in getNominatedNamespace()
2866 NamespaceDecl::NamespaceDecl(ASTContext &C, DeclContext *DC, bool Inline, in NamespaceDecl() function in NamespaceDecl
2878 NamespaceDecl *NamespaceDecl::Create(ASTContext &C, DeclContext *DC, in Create()
2886 NamespaceDecl *NamespaceDecl::CreateDeserialized(ASTContext &C, unsigned ID) { in CreateDeserialized()
2891 NamespaceDecl *NamespaceDecl::getOriginalNamespace() { in getOriginalNamespace()
2898 const NamespaceDecl *NamespaceDecl::getOriginalNamespace() const { in getOriginalNamespace()
2907 NamespaceDecl *NamespaceDecl::getNextRedeclarationImpl() { in getNextRedeclarationImpl()
2911 NamespaceDecl *NamespaceDecl::getPreviousDeclImpl() { in getPreviousDeclImpl()
[all …]
/llvm-project-15.0.7/clang/include/clang/Sema/
H A DHLSLExternalSemaSource.h18 class NamespaceDecl; variable
23 NamespaceDecl *HLSLNamespace;
H A DMultiplexExternalSemaSource.h27 class NamespaceDecl; variable
218 ReadKnownNamespaces(SmallVectorImpl<NamespaceDecl*> &Namespaces) override;
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/google/
H A DUsingNamespaceDirectiveCheck.cpp45 const NamespaceDecl *NS) { in isStdLiteralsNamespace()
49 const auto *Parent = dyn_cast_or_null<NamespaceDecl>(NS->getParent()); in isStdLiteralsNamespace()
H A DUsingNamespaceDirectiveCheck.h48 static bool isStdLiteralsNamespace(const NamespaceDecl *NS);
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/bugprone/
H A DForwardDeclarationNamespaceCheck.cpp98 auto *Ns1 = NamespaceDecl::castFromDeclContext(ParentDecl1); in haveSameNamespaceOrTranslationUnit()
99 auto *Ns2 = NamespaceDecl::castFromDeclContext(ParentDecl2); in haveSameNamespaceOrTranslationUnit()
108 const auto *NsDecl = cast<NamespaceDecl>(ParentDecl); in getNameOfNamespace()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvm/
H A DPreferRegisterOverUnsignedCheck.cpp44 if (const auto *Namespace = dyn_cast<NamespaceDecl>(Context)) in check()
49 const NamespaceDecl *Namespace = UsingDirective->getNominatedNamespace(); in check()
/llvm-project-15.0.7/clang/include/clang/AST/
H A DNestedNameSpecifier.h35 class NamespaceDecl; variable
132 const NamespaceDecl *NS);
185 NamespaceDecl *getAsNamespace() const;
431 void Extend(ASTContext &Context, NamespaceDecl *Namespace,
H A DDecl.h66 class NamespaceDecl; variable
101 NamespaceDecl *AnonymousNamespace = nullptr;
562 NamespaceDecl *getNextRedeclarationImpl() override;
563 NamespaceDecl *getPreviousDeclImpl() override;
564 NamespaceDecl *getMostRecentDeclImpl() override;
623 NamespaceDecl *getOriginalNamespace();
626 const NamespaceDecl *getOriginalNamespace() const;
635 NamespaceDecl *getAnonymousNamespace() const { in getAnonymousNamespace()
639 void setAnonymousNamespace(NamespaceDecl *D) { in setAnonymousNamespace()
644 NamespaceDecl *getCanonicalDecl() override { in getCanonicalDecl()
[all …]
H A DComparisonCategories.h36 class NamespaceDecl; variable
223 mutable NamespaceDecl *StdNS = nullptr;
/llvm-project-15.0.7/clang/lib/Tooling/Inclusions/
H A DStandardLibrary.cpp106 NSSymbolMap *Recognizer::namespaceSymbols(const NamespaceDecl *D) { in namespaceSymbols()
117 ND = llvm::dyn_cast_or_null<NamespaceDecl>(ND->getParent())) in namespaceSymbols()
137 NSSymbolMap *Symbols = namespaceSymbols(cast_or_null<NamespaceDecl>(DC)); in operator ()()
/llvm-project-15.0.7/lldb/source/Plugins/ExpressionParser/Clang/
H A DClangASTImporter.h180 void RegisterNamespaceMap(const clang::NamespaceDecl *decl,
183 NamespaceMapSP GetNamespaceMap(const clang::NamespaceDecl *decl);
185 void BuildNamespaceMap(const clang::NamespaceDecl *decl);
341 typedef llvm::DenseMap<const clang::NamespaceDecl *, NamespaceMapSP>
H A DClangASTSource.cpp189 if (const NamespaceDecl *namespace_context = in FindCompleteType()
190 dyn_cast<NamespaceDecl>(decl->getDeclContext())) { in FindCompleteType()
547 if (isa<NamespaceDecl>(context.m_decl_context)) { in FindExternalVisibleDecls()
567 NamespaceDecl *clang_namespace_decl = in FindExternalVisibleDecls()
1392 const NamespaceDecl *namespace_context = in LookupInNamespace()
1393 dyn_cast<NamespaceDecl>(context.m_decl_context); in LookupInNamespace()
1691 NamespaceDecl *ClangASTSource::AddNamespace( in AddNamespace()
1703 clang::NamespaceDecl *src_namespace_decl = in AddNamespace()
1714 NamespaceDecl *copied_namespace_decl = dyn_cast<NamespaceDecl>(copied_decl); in AddNamespace()
1724 return dyn_cast<NamespaceDecl>(copied_decl); in AddNamespace()
H A DClangASTImporter.cpp735 void ClangASTImporter::RegisterNamespaceMap(const clang::NamespaceDecl *decl, in RegisterNamespaceMap()
743 ClangASTImporter::GetNamespaceMap(const clang::NamespaceDecl *decl) { in GetNamespaceMap()
755 void ClangASTImporter::BuildNamespaceMap(const clang::NamespaceDecl *decl) { in BuildNamespaceMap()
760 const NamespaceDecl *parent_namespace = in BuildNamespaceMap()
761 dyn_cast<NamespaceDecl>(parent_context); in BuildNamespaceMap()
1109 if (auto *to_namespace = dyn_cast<clang::NamespaceDecl>(to)) { in Imported()
1110 auto *from_namespace = cast<clang::NamespaceDecl>(from); in Imported()
1144 if (auto *to_namespace_decl = dyn_cast<NamespaceDecl>(to)) { in Imported()
/llvm-project-15.0.7/clang-tools-extra/clang-change-namespace/
H A DChangeNamespace.cpp68 const NamespaceDecl *getOuterNamespace(const NamespaceDecl *InnerNs, in getOuterNamespace()
77 while (CurrentContext && !llvm::isa<NamespaceDecl>(CurrentContext)) in getOuterNamespace()
81 CurrentNs = llvm::cast<NamespaceDecl>(CurrentContext); in getOuterNamespace()
537 Result.Nodes.getNodeAs<NamespaceDecl>("old_ns")) { in run()
648 static SourceLocation getLocAfterNamespaceLBrace(const NamespaceDecl *NsDecl, in getLocAfterNamespaceLBrace()
669 const NamespaceDecl *NsDecl) { in moveOldNamespace()
692 const NamespaceDecl *OuterNs = getOuterNamespace(NsDecl, DiffOldNamespace); in moveOldNamespace()
746 const auto *NsDecl = Result.Nodes.getNodeAs<NamespaceDecl>("ns_decl"); in moveClassForwardDeclaration()
778 const auto *NsDecl = llvm::cast<NamespaceDecl>(NsDeclContext); in replaceQualifiedSymbolInDeclContext()
/llvm-project-15.0.7/lldb/source/Plugins/SymbolFile/PDB/
H A DPDBASTParser.h60 clang::NamespaceDecl *FindNamespaceDecl(const clang::DeclContext *parent,
71 typedef std::set<clang::NamespaceDecl *> NamespacesSet;
/llvm-project-15.0.7/clang/test/SemaCXX/
H A Dmember-expr.cpp49 struct NamespaceDecl;
55 struct NamespaceDecl : NamedDecl { struct
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/abseil/
H A DNoNamespaceCheck.cpp29 Result.Nodes.getNodeAs<NamespaceDecl>("abslNamespace"); in check()
/llvm-project-15.0.7/clang-tools-extra/clang-tidy/llvmlibc/
H A DImplementationInNamespaceCheck.cpp34 if (const auto *NS = dyn_cast<NamespaceDecl>(MatchedDecl)) { in check()

1234567