aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-12-15 01:34:56 +0000
committerDouglas Gregor <dgregor@apple.com>2010-12-15 01:34:56 +0000
commitbebbe0d9b7568ce43a464286bee49429489ef483 (patch)
treef46d0fb0c81e0d5b47522d8bc162398b3e9ee7d4 /lib/Sema/SemaStmt.cpp
parent8cc246c9a68c783a5b90d2e8b8927521cb3a49b7 (diff)
Variadic templates: extend the Expr class with a bit that specifies
whether the expression contains an unexpanded parameter pack, in the same vein as the changes to the Type hierarchy. Compute this bit within all of the Expr subclasses. This change required a bunch of reshuffling of dependency calculations, mainly to consolidate them inside the constructors and to fuse multiple loops that iterate over arguments to determine type dependence, value dependence, and (now) containment of unexpanded parameter packs. Again, testing is painfully sparse, because all of the diagnostics will change and it is more important to test the to-be-written visitor that collects unexpanded parameter packs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121831 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaStmt.cpp')
-rw-r--r--lib/Sema/SemaStmt.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/SemaStmt.cpp b/lib/Sema/SemaStmt.cpp
index 6c212a7eb8..2c7ff5bd47 100644
--- a/lib/Sema/SemaStmt.cpp
+++ b/lib/Sema/SemaStmt.cpp
@@ -32,7 +32,9 @@ using namespace sema;
StmtResult Sema::ActOnExprStmt(FullExprArg expr) {
Expr *E = expr.get();
- assert(E && "ActOnExprStmt(): missing expression");
+ if (!E) // FIXME: FullExprArg has no error state?
+ return StmtError();
+
// C99 6.8.3p2: The expression in an expression statement is evaluated as a
// void expression for its side effects. Conversion to void allows any
// operand, even incomplete types.