]> granicus.if.org Git - clang/commitdiff
Slightly improve the readability of MicrosoftVTableContext::computeVTablePaths()...
authorTimur Iskhodzhanov <timurrrr@google.com>
Mon, 31 Mar 2014 11:01:51 +0000 (11:01 +0000)
committerTimur Iskhodzhanov <timurrrr@google.com>
Mon, 31 Mar 2014 11:01:51 +0000 (11:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205178 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/VTableBuilder.cpp

index 1b982a306b9e523b0b7f4c3e62b46e71e04602b2..c6b38d31d4f1a7273fc471cc0f4b4e96ffa84bc0 100644 (file)
@@ -3215,13 +3215,13 @@ void MicrosoftVTableContext::computeVTablePaths(bool ForVBTables,
       Paths.push_back(P);
     }
 
+    if (B.isVirtual())
+      VBasesSeen.insert(Base);
+
     // After visiting any direct base, we've transitively visited all of its
     // morally virtual bases.
     for (const auto &VB : Base->vbases())
       VBasesSeen.insert(VB.getType()->getAsCXXRecordDecl());
-
-    if (B.isVirtual())
-      VBasesSeen.insert(Base);
   }
 
   // Sort the paths into buckets, and if any of them are ambiguous, extend all