]> granicus.if.org Git - clang/commitdiff
Clean up a C++0x/C++03 conditional check.
authorDouglas Gregor <dgregor@apple.com>
Fri, 27 May 2011 23:15:17 +0000 (23:15 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 27 May 2011 23:15:17 +0000 (23:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132229 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/JumpDiagnostics.cpp

index c1bcbef14652a66567bf653aca1f1516b8a0812d..ae154aae20628013c5767e1fc3ed083753f78f4c 100644 (file)
@@ -152,11 +152,10 @@ static std::pair<unsigned,unsigned>
                                         = dyn_cast<CXXConstructExpr>(Init))
               if (const CXXConstructorDecl *Constructor
                                                 = Construct->getConstructor())
-                if (Constructor->isDefaultConstructor() &&
-                    ((Context.getLangOptions().CPlusPlus0x &&
-                      Record->hasTrivialDefaultConstructor()) ||
-                     (!Context.getLangOptions().CPlusPlus0x &&
-                      Record->isPOD())))
+                if ((Context.getLangOptions().CPlusPlus0x
+                       ? Record->hasTrivialDefaultConstructor()
+                       : Record->isPOD()) &&
+                    Constructor->isDefaultConstructor())
                   CallsTrivialConstructor = true;
           }