diff options
author | Francois Pichet <pichet2000@gmail.com> | 2011-01-18 05:04:39 +0000 |
---|---|---|
committer | Francois Pichet <pichet2000@gmail.com> | 2011-01-18 05:04:39 +0000 |
commit | 64225794119eed4ffa7adb6dfc6f0e92d516ad69 (patch) | |
tree | e26f5af3f8d8a8012acf5fcbcb6eb153059b7877 /clang/lib/Parse/ParseExpr.cpp | |
parent | c8d55da05ac50214893b8a218048d5dbc756ce57 (diff) | |
download | bcm5719-llvm-64225794119eed4ffa7adb6dfc6f0e92d516ad69.tar.gz bcm5719-llvm-64225794119eed4ffa7adb6dfc6f0e92d516ad69.zip |
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.
llvm-svn: 123735
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r-- | clang/lib/Parse/ParseExpr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp index f48b7a5faa4..acbf3a5a927 100644 --- a/clang/lib/Parse/ParseExpr.cpp +++ b/clang/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(); |