From 80464680ce2ae47d30b9a404597643e5d8bf6bba Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 4 Nov 2016 12:04:16 +0000 Subject: [PATCH] [test] Test that static_assert is properly visited in liblcang git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@285994 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Index/load-staticassert.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/Index/load-staticassert.cpp diff --git a/test/Index/load-staticassert.cpp b/test/Index/load-staticassert.cpp new file mode 100644 index 0000000000..04e45c2d74 --- /dev/null +++ b/test/Index/load-staticassert.cpp @@ -0,0 +1,11 @@ + +static_assert(2 + 2 == 4, "Simple maths"); + +// RUN: c-index-test -test-load-source all -fno-delayed-template-parsing -std=c++11 %s | FileCheck %s +// CHECK: load-staticassert.cpp:2:1: StaticAssert=:2:1 (Definition) Extent=[2:1 - 2:42] +// CHECK: load-staticassert.cpp:2:15: BinaryOperator= Extent=[2:15 - 2:25] +// CHECK: load-staticassert.cpp:2:15: BinaryOperator= Extent=[2:15 - 2:20] +// CHECK: load-staticassert.cpp:2:15: IntegerLiteral= Extent=[2:15 - 2:16] +// CHECK: load-staticassert.cpp:2:19: IntegerLiteral= Extent=[2:19 - 2:20] +// CHECK: load-staticassert.cpp:2:24: IntegerLiteral= Extent=[2:24 - 2:25] +// CHECK: load-staticassert.cpp:2:27: StringLiteral="Simple maths" Extent=[2:27 - 2:41] -- 2.40.0