diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-04-27 13:50:30 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2008-04-27 13:50:30 +0000 |
| commit | 081148986a60a761ac7528a9a132cab2ec70273b (patch) | |
| tree | 94d2519348f1902edfbc32e6039e8c50b6d5c100 /clang/lib/Sema/SemaExpr.cpp | |
| parent | ed1eec4812bee974d9e7aafff96950184371b9af (diff) | |
| download | bcm5719-llvm-081148986a60a761ac7528a9a132cab2ec70273b.tar.gz bcm5719-llvm-081148986a60a761ac7528a9a132cab2ec70273b.zip | |
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
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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<ObjCInterfaceDecl>(D)) return Diag(Loc, diag::err_unexpected_interface, II.getName()); + if (isa<NamespaceDecl>(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; } + + |

