aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2011-01-18 05:04:39 +0000
committerFrancois Pichet <pichet2000@gmail.com>2011-01-18 05:04:39 +0000
commitdbee3411a22b0dbb03267f5445f7b796104991bb (patch)
treeaa3c7e4cf0f0f5e7f1e4617715e10efbf1cfaa9d /lib/Parse/ParseExpr.cpp
parent4dccb90e92ba9e4abffe0177493b6db9949678dd (diff)
Add support for explicit constructor calls in Microsoft mode.
For example: class A{ public: A& operator=(const A& that) { if (this != &that) { this->A::~A(); this->A::A(that); // <=== explicit constructor call. } return *this; } }; More work will be needed to support an explicit call to a template constructor. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r--lib/Parse/ParseExpr.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index f48b7a5faa..acbf3a5a92 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/lib/Parse/ParseExpr.cpp
@@ -1171,11 +1171,13 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
// expression), or we didn't see a '~' in the right place. We
// can still parse a destructor name here, but in that case it
// names a real destructor.
+ // Allow explicit constructor calls in Microsoft mode.
+ // FIXME: Add support for explicit call of template constructor.
UnqualifiedId Name;
if (ParseUnqualifiedId(SS,
/*EnteringContext=*/false,
/*AllowDestructorName=*/true,
- /*AllowConstructorName=*/false,
+ /*AllowConstructorName=*/ getLang().Microsoft,
ObjectType,
Name))
LHS = ExprError();