diff options
author | dim <dim@FreeBSD.org> | 2015-05-21 06:58:08 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2015-05-21 06:58:08 +0000 |
commit | 38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (patch) | |
tree | 133ab22e59f61162b7f8e8e794dd6458769e8e1a /lib/Sema/SemaExprCXX.cpp | |
parent | c1ee82b9c3720cafd4ddba67d76e76d4edd03163 (diff) | |
download | FreeBSD-src-38d6f2e7f2ce51a5b3836d26596c6c34a3288752.zip FreeBSD-src-38d6f2e7f2ce51a5b3836d26596c6c34a3288752.tar.gz |
Vendor import of clang RELEASE_361/final tag r237755 (effectively, 3.6.1 release):
https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_361/final@237755
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index 3e2a2de..a92b7ac 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -5705,6 +5705,16 @@ ExprResult Sema::BuildCXXMemberCallExpr(Expr *E, NamedDecl *FoundDecl, ExprResult Sema::BuildCXXNoexceptExpr(SourceLocation KeyLoc, Expr *Operand, SourceLocation RParen) { + // If the operand is an unresolved lookup expression, the expression is ill- + // formed per [over.over]p1, because overloaded function names cannot be used + // without arguments except in explicit contexts. + ExprResult R = CheckPlaceholderExpr(Operand); + if (R.isInvalid()) + return R; + + // The operand may have been modified when checking the placeholder type. + Operand = R.get(); + if (ActiveTemplateInstantiations.empty() && Operand->HasSideEffects(Context, false)) { // The expression operand for noexcept is in an unevaluated expression |