summaryrefslogtreecommitdiffstats
path: root/clang/unittests/libclang/LibclangTest.cpp
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2014-02-13 16:51:38 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2014-02-13 16:51:38 +0000
commitfbe5672746bed3920afc6265f5b8a0bce0f5e70b (patch)
tree22148d87f31c0081718c2ba243ca852fc78959bc /clang/unittests/libclang/LibclangTest.cpp
parent8459762c8854a1df73dc93092f669c8accce6919 (diff)
downloadbcm5719-llvm-fbe5672746bed3920afc6265f5b8a0bce0f5e70b.tar.gz
bcm5719-llvm-fbe5672746bed3920afc6265f5b8a0bce0f5e70b.zip
libclang: fix a bug in processing invalid arguments, introduced in r201249,
pointed out by Daniel Jasper in r201329 llvm-svn: 201346
Diffstat (limited to 'clang/unittests/libclang/LibclangTest.cpp')
-rw-r--r--clang/unittests/libclang/LibclangTest.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/clang/unittests/libclang/LibclangTest.cpp b/clang/unittests/libclang/LibclangTest.cpp
new file mode 100644
index 00000000000..7048af95842
--- /dev/null
+++ b/clang/unittests/libclang/LibclangTest.cpp
@@ -0,0 +1,17 @@
+//===- unittests/libclang/LibclangTest.cpp --- libclang tests -------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang-c/Index.h"
+#include "gtest/gtest.h"
+
+TEST(libclang, TestInvalidArgs) {
+ EXPECT_EQ(CXError_InvalidArguments,
+ clang_parseTranslationUnit2(0, 0, 0, 0, 0, 0, 0, 0));
+}
+
OpenPOWER on IntegriCloud