diff options
author | John McCall <rjmccall@apple.com> | 2010-11-23 20:48:44 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-11-23 20:48:44 +0000 |
commit | dfa1edbebeda7ec3a7a9c45e4317de9241aa9883 (patch) | |
tree | 7f9a9fe9d4fb690d8f3e8d53ef25f493099d4924 /lib/AST/ExprClassification.cpp | |
parent | 7a73002783b30dcf613b06dbe618cfc1d1116ff8 (diff) |
A few tweaks to the value-kind computation:
- Default argument expressions pick up the value kind of the incoming
expression, not the value kind of the parameter it initializes.
- When building a template argument for substitution, A::x is an rvalue
if x is an instance method.
- Anonymous struct/union paths pick up value kind the same way that
normal member accesses do; extract out a common code path for this.
Enable the value-kind assertion, now that it passes self-host.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120055 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ExprClassification.cpp')
-rw-r--r-- | lib/AST/ExprClassification.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/AST/ExprClassification.cpp b/lib/AST/ExprClassification.cpp index bf26bd1f93..f24ddcbb73 100644 --- a/lib/AST/ExprClassification.cpp +++ b/lib/AST/ExprClassification.cpp @@ -64,7 +64,6 @@ Cl Expr::ClassifyImpl(ASTContext &Ctx, SourceLocation *Loc) const { kind = Cl::CL_Void; } -#if 0 // Enable this assertion for testing. switch (kind) { case Cl::CL_LValue: assert(getValueKind() == VK_LValue); break; @@ -77,7 +76,6 @@ Cl Expr::ClassifyImpl(ASTContext &Ctx, SourceLocation *Loc) const { case Cl::CL_ClassTemporary: case Cl::CL_PRValue: assert(getValueKind() == VK_RValue); break; } -#endif Cl::ModifiableType modifiable = Cl::CM_Untested; if (Loc) |