diff options
author | John McCall <rjmccall@apple.com> | 2011-04-10 19:13:55 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-04-10 19:13:55 +0000 |
commit | fb8721ce4c6fef3739b1cbd1e38e3f1949462033 (patch) | |
tree | 54f0addce9b93c4e981327b42e9d235c3f3aa575 /lib/Sema/SemaExprCXX.cpp | |
parent | cd0b32e73a66a20a8dab7a7f0ce963dc669f7c0a (diff) |
Simplify calling CheckPlaceholderExpr, converge on it in a few places,
and move a vector-splat check to follow l-value conversion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129254 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprCXX.cpp')
-rw-r--r-- | lib/Sema/SemaExprCXX.cpp | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp index fb4ff7891f..7cfbc7e172 100644 --- a/lib/Sema/SemaExprCXX.cpp +++ b/lib/Sema/SemaExprCXX.cpp @@ -3987,30 +3987,9 @@ ExprResult Sema::ActOnFinishFullExpr(Expr *FE) { if (DiagnoseUnexpandedParameterPack(FullExpr.get())) return ExprError(); - // 13.4.1 ... An overloaded function name shall not be used without arguments - // in contexts other than those listed [i.e list of targets]. - // - // void foo(); void foo(int); - // template<class T> void fooT(); template<class T> void fooT(int); - - // Therefore these should error: - // foo; - // fooT<int>; - - if (FullExpr.get()->getType() == Context.OverloadTy) { - ExprResult Fixed - = ResolveAndFixSingleFunctionTemplateSpecialization(FullExpr.get(), - /*DoFunctionPointerConversion=*/false, - /*Complain=*/true, - FullExpr.get()->getSourceRange(), - QualType(), - diag::err_addr_ovl_ambiguous); - if (Fixed.isInvalid()) - return ExprError(); - - FullExpr = Fixed.get(); - } - + FullExpr = CheckPlaceholderExpr(FullExpr.take()); + if (FullExpr.isInvalid()) + return ExprError(); FullExpr = IgnoredValueConversions(FullExpr.take()); if (FullExpr.isInvalid()) |