aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-10-28 00:22:11 +0000
committerDouglas Gregor <dgregor@apple.com>2008-10-28 00:22:11 +0000
commit9d293dfc0ad7c44ae0b5eb9517f1ed8c8d8b7ff7 (patch)
treea2ce41058d0f9114ddf1d894891afb985b2a0c21 /lib/Sema/SemaDecl.cpp
parent8173dba2229e113052e762b4eda98f8edfdff173 (diff)
Improve our handling of (C++) references within Clang. Specifically:
- Do not allow expressions to ever have reference type - Extend Expr::isLvalue to handle more cases where having written a reference into the source implies that the expression is an lvalue (e.g., function calls, C++ casts). - Make GRExprEngine::VisitCall treat the call arguments as lvalues when they are being bound to a reference parameter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58306 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 7b88ec2c16..3e33172c8a 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -1382,11 +1382,6 @@ bool Sema::CheckForConstantInitializer(Expr *Init, QualType DclT) {
if (CompoundLiteralExpr *e = dyn_cast<CompoundLiteralExpr>(Init))
return CheckForConstantInitializer(e->getInitializer(), DclT);
- if (Init->getType()->isReferenceType()) {
- // FIXME: Work out how the heck references work.
- return false;
- }
-
if (InitListExpr *Exp = dyn_cast<InitListExpr>(Init)) {
unsigned numInits = Exp->getNumInits();
for (unsigned i = 0; i < numInits; i++) {