diff options
author | David Blaikie <dblaikie@gmail.com> | 2013-07-13 19:23:35 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2013-07-13 19:23:35 +0000 |
commit | f475bf83a45435a211edb4e0ef6ac3481ce7b3fe (patch) | |
tree | 413fde60bbdde17c2aeafc8420a2ebee0207dc25 /unittests/AST | |
parent | 65732a200987cb4b007fbb3015a8bae175ddb832 (diff) | |
download | clang-f475bf83a45435a211edb4e0ef6ac3481ce7b3fe.tar.gz |
Revert "Revert "PR16540: ASTVector::insert(Context, Iter, Element) doesn't compile""
This reverts commit b18b043a5a37f76803d89467e46bcac286c0ecae.
Reapply with fix for the configure+make build (missing include of
ASTContext.h).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/AST')
-rw-r--r-- | unittests/AST/ASTVectorTest.cpp | 24 | ||||
-rw-r--r-- | unittests/AST/CMakeLists.txt | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/unittests/AST/ASTVectorTest.cpp b/unittests/AST/ASTVectorTest.cpp new file mode 100644 index 0000000000..a92e86b3cd --- /dev/null +++ b/unittests/AST/ASTVectorTest.cpp @@ -0,0 +1,24 @@ +//===- 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/ASTContext.h" +#include "clang/AST/ASTVector.h" + +using namespace clang; + +LLVM_ATTRIBUTE_UNUSED void CompileTest() { + ASTContext *C = 0; + ASTVector<int> V; + V.insert(*C, V.begin(), 0); +} diff --git a/unittests/AST/CMakeLists.txt b/unittests/AST/CMakeLists.txt index c414ae3b23..70f86d3c73 100644 --- a/unittests/AST/CMakeLists.txt +++ b/unittests/AST/CMakeLists.txt @@ -1,6 +1,7 @@ add_clang_unittest(ASTTests ASTContextParentMapTest.cpp ASTTypeTraitsTest.cpp + ASTVectorTest.cpp CommentLexer.cpp CommentParser.cpp DeclPrinterTest.cpp |