]> granicus.if.org Git - clang/commitdiff
Fixed CXX struct and class initialization printing to support 'move'
authorJim Goodnow II <jim@thegoodnows.net>
Sun, 30 Oct 2011 11:17:39 +0000 (11:17 +0000)
committerJim Goodnow II <jim@thegoodnows.net>
Sun, 30 Oct 2011 11:17:39 +0000 (11:17 +0000)
type constructors.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143309 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclPrinter.cpp

index 08a1ab5723cdae19b5df7d4fc752bab7d65c8739..d3c9c7a1ec7a9a31f2be22890a274a0187ef844a 100644 (file)
@@ -616,7 +616,7 @@ void DeclPrinter::VisitVarDecl(VarDecl *D) {
       Out << "(";
     else {
         CXXConstructExpr *CCE = dyn_cast<CXXConstructExpr>(Init);
-        if (!CCE || CCE->getConstructor()->isCopyConstructor())
+        if (!CCE || CCE->getConstructor()->isCopyOrMoveConstructor())
           Out << " = ";
     }
     Init->printPretty(Out, Context, 0, Policy, Indentation);