From 081148986a60a761ac7528a9a132cab2ec70273b Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sun, 27 Apr 2008 13:50:30 +0000 Subject: Parsing of namespaces: -NamespaceDecl for the AST -Checks for name clashes between namespaces and tag/normal declarations. This commit doesn't implement proper name lookup for namespaces. llvm-svn: 50321 --- clang/lib/Sema/SemaExpr.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'clang/lib/Sema/SemaExpr.cpp') diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index e3298f37af5..edd9284a39a 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -128,6 +128,8 @@ Sema::ExprResult Sema::ActOnIdentifierExpr(Scope *S, SourceLocation Loc, return Diag(Loc, diag::err_unexpected_typedef, II.getName()); if (isa(D)) return Diag(Loc, diag::err_unexpected_interface, II.getName()); + if (isa(D)) + return Diag(Loc, diag::err_unexpected_namespace, II.getName()); assert(0 && "Invalid decl"); abort(); @@ -2313,3 +2315,5 @@ bool Sema::DiagnoseAssignmentResult(AssignConvertType ConvTy, return isInvalid; } + + -- cgit v1.2.3