aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclBase.cpp
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-03-13 04:12:34 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-03-13 04:12:34 +0000
commit65daef179790a02eab1b5a989f53984375a06483 (patch)
tree1b8c672a04a8d0b01be2aa0c314e18525a4d063d /lib/AST/DeclBase.cpp
parent1b7f9cbed1b96b58a6e5f7808ebc9345a76a0936 (diff)
It never makes sense to do a lookup into a LinkageSpecDecl, so assert that we
don't, and clean up the places that do it. The change to ASTWriter is surprising, but the deleted code is a no-op as of r152608. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152609 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r--lib/AST/DeclBase.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 9171d2792c..2e275cfab1 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -1084,6 +1084,9 @@ void DeclContext::addDeclInternal(Decl *D) {
DeclContext::lookup_result
DeclContext::lookup(DeclarationName Name) {
+ assert(DeclKind != Decl::LinkageSpec &&
+ "Should not perform lookups into linkage specs!");
+
DeclContext *PrimaryContext = getPrimaryContext();
if (PrimaryContext != this)
return PrimaryContext->lookup(Name);