aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclCXX.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-11-18 07:57:50 +0000
committerJohn McCall <rjmccall@apple.com>2009-11-18 07:57:50 +0000
commit7d384dd5ace9ae9a22a69e700d2cacb256bc6c69 (patch)
treeb4941a12e43917606179bb8db65b5c3906e3b5c8 /lib/Sema/SemaDeclCXX.cpp
parent1c5c1a09a4a224c5c01f0a2a0d69224c8356f0be (diff)
Split LookupResult into its own header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r--lib/Sema/SemaDeclCXX.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp
index cb18064638..237a869f90 100644
--- a/lib/Sema/SemaDeclCXX.cpp
+++ b/lib/Sema/SemaDeclCXX.cpp
@@ -12,6 +12,7 @@
//===----------------------------------------------------------------------===//
#include "Sema.h"
+#include "Lookup.h"
#include "clang/AST/ASTConsumer.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/CXXInheritance.h"
@@ -2639,7 +2640,7 @@ Sema::DeclPtrTy Sema::ActOnStartNamespaceDef(Scope *NamespcScope,
NamedDecl *PrevDecl
= LookupSingleName(DeclRegionScope, II, LookupOrdinaryName,
- LookupResult::ForRedeclaration);
+ ForRedeclaration);
if (NamespaceDecl *OrigNS = dyn_cast_or_null<NamespaceDecl>(PrevDecl)) {
// This is an extended namespace definition.
@@ -3028,8 +3029,7 @@ Sema::DeclPtrTy Sema::ActOnNamespaceAliasDef(Scope *S,
// Check if we have a previous declaration with the same name.
if (NamedDecl *PrevDecl
- = LookupSingleName(S, Alias, LookupOrdinaryName,
- LookupResult::ForRedeclaration)) {
+ = LookupSingleName(S, Alias, LookupOrdinaryName, ForRedeclaration)) {
if (NamespaceAliasDecl *AD = dyn_cast<NamespaceAliasDecl>(PrevDecl)) {
// We already have an alias with the same name that points to the same
// namespace, so don't create a new one.
@@ -4676,8 +4676,7 @@ Sema::ActOnFriendFunctionDecl(Scope *S,
// FIXME: handle dependent contexts
if (!DC) return DeclPtrTy();
- LookupResult R(*this, Name, Loc, LookupOrdinaryName,
- LookupResult::ForRedeclaration);
+ LookupResult R(*this, Name, Loc, LookupOrdinaryName, ForRedeclaration);
LookupQualifiedName(R, DC);
PrevDecl = R.getAsSingleDecl(Context);
@@ -4712,8 +4711,7 @@ Sema::ActOnFriendFunctionDecl(Scope *S,
while (DC->isRecord())
DC = DC->getParent();
- LookupResult R(*this, Name, Loc, LookupOrdinaryName,
- LookupResult::ForRedeclaration);
+ LookupResult R(*this, Name, Loc, LookupOrdinaryName, ForRedeclaration);
LookupQualifiedName(R, DC);
PrevDecl = R.getAsSingleDecl(Context);