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 | 67fc79f9eaa2ba685f66586104a2a3ffd893f36d (patch) | |
| tree | 119bbbd10f3b4799feec9c489d77984f069a2c79 /clang/unittests/AST | |
| parent | a92eeebde82580ed6b63494639e1773ee1c88ca0 (diff) | |
| download | bcm5719-llvm-67fc79f9eaa2ba685f66586104a2a3ffd893f36d.tar.gz bcm5719-llvm-67fc79f9eaa2ba685f66586104a2a3ffd893f36d.zip | |
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).
llvm-svn: 186257
Diffstat (limited to 'clang/unittests/AST')
| -rw-r--r-- | clang/unittests/AST/ASTVectorTest.cpp | 24 | ||||
| -rw-r--r-- | clang/unittests/AST/CMakeLists.txt | 1 |
2 files changed, 25 insertions, 0 deletions
diff --git a/clang/unittests/AST/ASTVectorTest.cpp b/clang/unittests/AST/ASTVectorTest.cpp new file mode 100644 index 00000000000..a92e86b3cd8 --- /dev/null +++ b/clang/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/clang/unittests/AST/CMakeLists.txt b/clang/unittests/AST/CMakeLists.txt index c414ae3b237..70f86d3c730 100644 --- a/clang/unittests/AST/CMakeLists.txt +++ b/clang/unittests/AST/CMakeLists.txt @@ -1,6 +1,7 @@ add_clang_unittest(ASTTests ASTContextParentMapTest.cpp ASTTypeTraitsTest.cpp + ASTVectorTest.cpp CommentLexer.cpp CommentParser.cpp DeclPrinterTest.cpp |

