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 | feb624a435932b9c7888cc3a0a80b683f72a8554 (patch) | |
tree | 035426fe397a76b3251a7f907dbcb620bdb1108c /clang/lib/AST/ExprClassification.cpp | |
parent | ab7be6e43c878f4192cdac764677304757d95d71 (diff) | |
download | bcm5719-llvm-feb624a435932b9c7888cc3a0a80b683f72a8554.tar.gz bcm5719-llvm-feb624a435932b9c7888cc3a0a80b683f72a8554.zip |
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.
llvm-svn: 120055
Diffstat (limited to 'clang/lib/AST/ExprClassification.cpp')
-rw-r--r-- | clang/lib/AST/ExprClassification.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/AST/ExprClassification.cpp b/clang/lib/AST/ExprClassification.cpp index bf26bd1f93f..f24ddcbb732 100644 --- a/clang/lib/AST/ExprClassification.cpp +++ b/clang/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) |