summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index a780012235a..147b4c8323d 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -1291,8 +1291,8 @@ ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc,
// resolution to pick the function.
if (Ovl) {
OverloadCandidateSet CandidateSet;
- OverloadCandidateSet::iterator Best;
AddOverloadCandidates(Ovl, Args, NumArgs, CandidateSet);
+ OverloadCandidateSet::iterator Best;
switch (BestViableFunction(CandidateSet, Best)) {
case OR_Success:
{
@@ -1327,6 +1327,10 @@ ActOnCallExpr(ExprTy *fn, SourceLocation LParenLoc,
}
}
+ if (getLangOptions().CPlusPlus && Fn->getType()->isRecordType())
+ return BuildCallToObjectOfClassType(Fn, LParenLoc, Args, NumArgs,
+ CommaLocs, RParenLoc);
+
// Promote the function operand.
UsualUnaryConversions(Fn);
OpenPOWER on IntegriCloud