[cfe-commits] r151270 - /cfe/trunk/lib/AST/CXXInheritance.cpp

Benjamin Kramer benny.kra at googlemail.com
Thu Feb 23 10:35:56 PST 2012


Author: d0k
Date: Thu Feb 23 12:35:56 2012
New Revision: 151270

URL: http://llvm.org/viewvc/llvm-project?rev=151270&view=rev
Log:
Actually remove the duplicated elements from the vector.

Modified:
    cfe/trunk/lib/AST/CXXInheritance.cpp

Modified: cfe/trunk/lib/AST/CXXInheritance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CXXInheritance.cpp?rev=151270&r1=151269&r2=151270&view=diff
==============================================================================
--- cfe/trunk/lib/AST/CXXInheritance.cpp (original)
+++ cfe/trunk/lib/AST/CXXInheritance.cpp Thu Feb 23 12:35:56 2012
@@ -30,7 +30,7 @@
 
   // Eliminate duplicated decls.
   llvm::array_pod_sort(Decls.begin(), Decls.end());
-  std::unique(Decls.begin(), Decls.end());
+  Decls.erase(std::unique(Decls.begin(), Decls.end()), Decls.end());
 
   NumDeclsFound = Decls.size();
   DeclsFound = new NamedDecl * [NumDeclsFound];





More information about the cfe-commits mailing list