Harden Sema::MaybeBindTotemporary.

llvm-svn: 117954
This commit is contained in:
Douglas Gregor 2010-11-01 21:10:29 +00:00
parent 6186c96765
commit 298087bc25
1 changed files with 3 additions and 0 deletions

View File

@ -2933,6 +2933,9 @@ QualType Sema::FindCompositePointerType(SourceLocation Loc,
}
ExprResult Sema::MaybeBindToTemporary(Expr *E) {
if (!E)
return ExprError();
if (!Context.getLangOptions().CPlusPlus)
return Owned(E);