<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi David,<div><br></div><div>This breaks a buildbot:</div><div><a href="http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4351">http://lab.llvm.org:8013/builders/clang-x86_64-darwin11-nobootstrap-RAincremental/builds/4351</a></div><div><pre style="font-family: 'Courier New', courier, monotype; "><span class="stdout">llvm[4]: Linking Release+Asserts unit test AST
</span><span class="stderr" style="color: red; ">Undefined symbols for architecture x86_64:
  "operator new[](unsigned long, clang::ASTContext const&, unsigned long)", referenced from:
      clang::ASTVector<int>::insert(clang::ASTContext&, int*, int const&) in ASTVectorTest.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [Release+Asserts/ASTTests] Error 1
make[3]: *** [AST/.makeall] Error 2
make[3]: *** Waiting for unfinished jobs....</span></pre><div>Could you fix it please?</div><div><br></div><div>Thanks,</div><div><br></div><div>-Quentin</div><div><div>On Jul 13, 2013, at 11:08 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Author: dblaikie<br>Date: Sat Jul 13 13:08:59 2013<br>New Revision: 186253<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=186253&view=rev">http://llvm.org/viewvc/llvm-project?rev=186253&view=rev</a><br>Log:<br>PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile<br><br>Fix some uninstantiable code in ASTVector::insert. I've added a<br>cheap-and-dirty compile test for this, because I don't have the time to<br>figure out a nice way to get a real ASTContext to implement executable<br>tests - but we probably should have them for this ADT.<br><br>Added:<br>    cfe/trunk/unittests/AST/ASTVectorTest.cpp<br>Modified:<br>    cfe/trunk/include/clang/AST/ASTVector.h<br>    cfe/trunk/unittests/AST/CMakeLists.txt<br><br>Modified: cfe/trunk/include/clang/AST/ASTVector.h<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTVector.h?rev=186253&r1=186252&r2=186253&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/ASTVector.h?rev=186253&r1=186252&r2=186253&view=diff</a><br>==============================================================================<br>--- cfe/trunk/include/clang/AST/ASTVector.h (original)<br>+++ cfe/trunk/include/clang/AST/ASTVector.h Sat Jul 13 13:08:59 2013<br>@@ -216,11 +216,11 @@ public:<br><br>   iterator insert(ASTContext &C, iterator I, const T &Elt) {<br>     if (I == this->end()) {  // Important special case for empty vector.<br>-      push_back(Elt);<br>+      push_back(Elt, C);<br>       return this->end()-1;<br>     }<br><br>-    if (this->EndX < this->CapacityX) {<br>+    if (this->End < this->Capacity) {<br>     Retry:<br>       new (this->end()) T(this->back());<br>       this->setEnd(this->end()+1);<br><br>Added: cfe/trunk/unittests/AST/ASTVectorTest.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/ASTVectorTest.cpp?rev=186253&view=auto">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/ASTVectorTest.cpp?rev=186253&view=auto</a><br>==============================================================================<br>--- cfe/trunk/unittests/AST/ASTVectorTest.cpp (added)<br>+++ cfe/trunk/unittests/AST/ASTVectorTest.cpp Sat Jul 13 13:08:59 2013<br>@@ -0,0 +1,26 @@<br>+//===- unittests/AST/DeclTest.cpp --- Declaration tests -------------------===//<br>+//<br>+//                     The LLVM Compiler Infrastructure<br>+//<br>+// This file is distributed under the University of Illinois Open Source<br>+// License. See LICENSE.TXT for details.<br>+//<br>+//===----------------------------------------------------------------------===//<br>+//<br>+// Unit tests for the ASTVector container.<br>+//<br>+//===----------------------------------------------------------------------===//<br>+<br>+#include "llvm/Support/Compiler.h"<br>+#include "clang/AST/ASTVector.h"<br>+#include "clang/Basic/TargetInfo.h"<br>+#include "clang/Frontend/CompilerInstance.h"<br>+#include "gtest/gtest.h"<br>+<br>+using namespace clang;<br>+<br>+LLVM_ATTRIBUTE_UNUSED void CompileTest() {<br>+  ASTContext *C = 0;<br>+  ASTVector<int> V;<br>+  V.insert(*C, V.begin(), 0);<br>+}<br><br>Modified: cfe/trunk/unittests/AST/CMakeLists.txt<br>URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CMakeLists.txt?rev=186253&r1=186252&r2=186253&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/AST/CMakeLists.txt?rev=186253&r1=186252&r2=186253&view=diff</a><br>==============================================================================<br>--- cfe/trunk/unittests/AST/CMakeLists.txt (original)<br>+++ cfe/trunk/unittests/AST/CMakeLists.txt Sat Jul 13 13:08:59 2013<br>@@ -1,6 +1,7 @@<br> add_clang_unittest(ASTTests<br>   ASTContextParentMapTest.cpp<br>   ASTTypeTraitsTest.cpp<br>+  ASTVectorTest.cpp<br>   CommentLexer.cpp<br>   CommentParser.cpp<br>   DeclPrinterTest.cpp<br><br><br>_______________________________________________<br>cfe-commits mailing list<br><a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits<br></blockquote></div><br></div></body></html>