summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-24 21:46:40 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2008-10-24 21:46:40 +0000
commit22c40fa28551f0da487f399a2fe0d3d25edf3edc (patch)
treebc2ce950d8e47e9a2ea3075d2d0ca232fb927385 /clang/lib/Sema/SemaExpr.cpp
parentc15758659826d042658c2f8acc52a95d68741bb4 (diff)
downloadbcm5719-llvm-22c40fa28551f0da487f399a2fe0d3d25edf3edc.tar.gz
bcm5719-llvm-22c40fa28551f0da487f399a2fe0d3d25edf3edc.zip
-Add support for cv-qualifiers after function declarators.
-Add withConst/withVolatile/withRestrict methods to QualType class, that return the QualType plus the respective qualifier. llvm-svn: 58120
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 9b1543f7901..6fd1c5cc2fd 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -402,7 +402,9 @@ Sema::ExprResult Sema::ActOnIdentifierExpr(Scope *S, SourceLocation Loc,
if (FD->isInvalidDecl())
return true;
- return new DeclRefExpr(FD, FD->getType(), Loc);
+ // FIXME: Handle 'mutable'.
+ return new DeclRefExpr(FD,
+ FD->getType().getWithAdditionalQualifiers(MD->getTypeQualifiers()),Loc);
}
return Diag(Loc, diag::err_invalid_non_static_member_use, FD->getName());
OpenPOWER on IntegriCloud