aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/Decl.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-09 19:08:19 +0000
commit798321d8eb5630cd4a8f490a4f25e32ef195fb07 (patch)
treea59f5569ef36d00388c0428426abef26aa9105b6 /include/clang/AST/Decl.h
parent5e20cdd81c44a443562a09007668ffdf76c455af (diff)
Notes
Diffstat (limited to 'include/clang/AST/Decl.h')
-rw-r--r--include/clang/AST/Decl.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h
index 451f9da1b60ac..e06b58b37be26 100644
--- a/include/clang/AST/Decl.h
+++ b/include/clang/AST/Decl.h
@@ -236,7 +236,11 @@ public:
bool isHidden() const { return Hidden; }
/// \brief Set whether this declaration is hidden from name lookup.
- void setHidden(bool Hide) { Hidden = Hide; }
+ void setHidden(bool Hide) {
+ assert((!Hide || isFromASTFile() || hasLocalOwningModuleStorage()) &&
+ "declaration with no owning module can't be hidden");
+ Hidden = Hide;
+ }
/// \brief Determine whether this declaration is a C++ class member.
bool isCXXClassMember() const {