summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorSebastian Redl <sebastian.redl@getdesigned.at>2010-06-09 21:19:43 +0000
committerSebastian Redl <sebastian.redl@getdesigned.at>2010-06-09 21:19:43 +0000
commitc3eba8f547c7079a79e321e8f18893b80b52f413 (patch)
tree037d053e20dae0d7299fcee7c2df2ac090e2ddf7 /clang/lib
parent243d9057d098a76becc5636b20d8b6f685389966 (diff)
downloadbcm5719-llvm-c3eba8f547c7079a79e321e8f18893b80b52f413.tar.gz
bcm5719-llvm-c3eba8f547c7079a79e321e8f18893b80b52f413.zip
Commit my WIP on constexpr support. This commit: an XFAILed test and treating constexpr as a top-level const.
llvm-svn: 105752
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Sema/SemaType.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
index 8327fd26864..bec929dabf0 100644
--- a/clang/lib/Sema/SemaType.cpp
+++ b/clang/lib/Sema/SemaType.cpp
@@ -860,7 +860,7 @@ QualType Sema::BuildMemberPointerType(QualType T, QualType Class,
T = Context.getCanonicalType(T);
}
- // C++ 8.3.3p3: A pointer to member shall not pointer to ... a member
+ // C++ 8.3.3p3: A pointer to member shall not point to ... a member
// with reference type, or "cv void."
if (T->isReferenceType()) {
Diag(Loc, diag::err_illegal_decl_mempointer_to_reference)
@@ -1335,6 +1335,11 @@ TypeSourceInfo *Sema::GetTypeForDeclarator(Declarator &D, Scope *S,
}
}
+ // If there's a constexpr specifier, treat it as a top-level const.
+ if (D.getDeclSpec().isConstexprSpecified()) {
+ T.addConst();
+ }
+
// Process any function attributes we might have delayed from the
// declaration-specifiers.
ProcessDelayedFnAttrs(*this, T, FnAttrsFromDeclSpec);
OpenPOWER on IntegriCloud