summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/ASTVectorTest.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2013-07-13 18:08:59 +0000
committerDavid Blaikie <dblaikie@gmail.com>2013-07-13 18:08:59 +0000
commit4cffb8ed5caf6617a510bc3e985e3e81a4861edf (patch)
tree28f6889ce232fca90b26fbe3f34aab4400bac041 /clang/unittests/AST/ASTVectorTest.cpp
parent8e01ae895d0393e54633e4808c57346bba3a235d (diff)
downloadbcm5719-llvm-4cffb8ed5caf6617a510bc3e985e3e81a4861edf.tar.gz
bcm5719-llvm-4cffb8ed5caf6617a510bc3e985e3e81a4861edf.zip
PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile
Fix some uninstantiable code in ASTVector::insert. I've added a cheap-and-dirty compile test for this, because I don't have the time to figure out a nice way to get a real ASTContext to implement executable tests - but we probably should have them for this ADT. llvm-svn: 186253
Diffstat (limited to 'clang/unittests/AST/ASTVectorTest.cpp')
-rw-r--r--clang/unittests/AST/ASTVectorTest.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/unittests/AST/ASTVectorTest.cpp b/clang/unittests/AST/ASTVectorTest.cpp
new file mode 100644
index 00000000000..f8527432d26
--- /dev/null
+++ b/clang/unittests/AST/ASTVectorTest.cpp
@@ -0,0 +1,26 @@
+//===- unittests/AST/DeclTest.cpp --- Declaration tests -------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// Unit tests for the ASTVector container.
+//
+//===----------------------------------------------------------------------===//
+
+#include "llvm/Support/Compiler.h"
+#include "clang/AST/ASTVector.h"
+#include "clang/Basic/TargetInfo.h"
+#include "clang/Frontend/CompilerInstance.h"
+#include "gtest/gtest.h"
+
+using namespace clang;
+
+LLVM_ATTRIBUTE_UNUSED void CompileTest() {
+ ASTContext *C = 0;
+ ASTVector<int> V;
+ V.insert(*C, V.begin(), 0);
+}
OpenPOWER on IntegriCloud