aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2009-01-21 22:32:33 +0000
committerSteve Naroff <snaroff@apple.com>2009-01-21 22:32:33 +0000
commit872b9acd95f8ecec52db6fe4053bc349ae2dfa43 (patch)
tree560c510f0c073dcace2fd1f92780459d0113f4c1
parent241677a13cc46647a8f5098b3e3239bd9480dca2 (diff)
Fix Sema::Owned(ExprResult) to not use a ternary operator. Necessary to work around a Visual Studio compiler bug.
Thanks to Doug Gregor for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62723 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/Sema.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Sema/Sema.h b/lib/Sema/Sema.h
index 80168544dc..49e3eb8b5c 100644
--- a/lib/Sema/Sema.h
+++ b/lib/Sema/Sema.h
@@ -249,7 +249,9 @@ public:
OwningExprResult Owned(Expr* E) { return OwningExprResult(*this, E); }
OwningExprResult Owned(ExprResult R) {
- return R.isInvalid ? ExprError() : OwningExprResult(*this, R.Val);
+ if (R.isInvalid)
+ return ExprError();
+ return OwningExprResult(*this, R.Val);
}
OwningStmtResult Owned(Stmt* S) { return OwningStmtResult(*this, S); }