r285994 - [test] Test that static_assert is properly visited in liblcang

Olivier Goffart via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 4 05:04:16 PDT 2016


Author: ogoffart
Date: Fri Nov  4 07:04:16 2016
New Revision: 285994

URL: http://llvm.org/viewvc/llvm-project?rev=285994&view=rev
Log:
[test] Test that static_assert is properly visited in liblcang

Added:
    cfe/trunk/test/Index/load-staticassert.cpp

Added: cfe/trunk/test/Index/load-staticassert.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/load-staticassert.cpp?rev=285994&view=auto
==============================================================================
--- cfe/trunk/test/Index/load-staticassert.cpp (added)
+++ cfe/trunk/test/Index/load-staticassert.cpp Fri Nov  4 07:04:16 2016
@@ -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]




More information about the cfe-commits mailing list