diff options
| author | Steve Naroff <snaroff@apple.com> | 2009-01-21 22:32:33 +0000 |
|---|---|---|
| committer | Steve Naroff <snaroff@apple.com> | 2009-01-21 22:32:33 +0000 |
| commit | d512956f6ff80a04d119b927d81ad14aa9a1f12c (patch) | |
| tree | 9cc2b4f9a92c9ee8ce4a2183e5986e1ca34d2e1a /clang/lib | |
| parent | 16fbfe699ebc0fe96b7768632a46a4ff64646e07 (diff) | |
| download | bcm5719-llvm-d512956f6ff80a04d119b927d81ad14aa9a1f12c.tar.gz bcm5719-llvm-d512956f6ff80a04d119b927d81ad14aa9a1f12c.zip | |
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.
llvm-svn: 62723
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/Sema.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Sema/Sema.h b/clang/lib/Sema/Sema.h index 80168544dcb..49e3eb8b5c0 100644 --- a/clang/lib/Sema/Sema.h +++ b/clang/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); } |

