diff options
Diffstat (limited to 'compilerplugins/clang/check.hxx')
-rw-r--r-- | compilerplugins/clang/check.hxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx index 0904e5f2f1a1..4ac4f8e99cb6 100644 --- a/compilerplugins/clang/check.hxx +++ b/compilerplugins/clang/check.hxx @@ -103,6 +103,9 @@ private: class ContextCheck { public: + explicit ContextCheck(clang::DeclContext const * context = nullptr): + context_(context) {} + explicit operator bool() const { return context_ != nullptr; } TerminalCheck GlobalNamespace() const; @@ -111,6 +114,8 @@ public: TerminalCheck StdNamespace() const; + TerminalCheck StdOrNestedNamespace() const; + ContextCheck AnonymousNamespace() const; inline ContextCheck Class(llvm::StringRef id) const; @@ -120,14 +125,6 @@ public: explicit ContextCheck(const clang::NamespaceDecl * decl ) : context_( decl ) {} private: - friend DeclCheck; - friend TypeCheck; - friend ContextCheck detail::checkRecordDecl( - clang::Decl const * decl, clang::TagTypeKind tag, llvm::StringRef id); - - explicit ContextCheck(clang::DeclContext const * context = nullptr): - context_(context) {} - clang::DeclContext const * const context_; }; |