aboutsummaryrefslogtreecommitdiff
path: root/test/Index/annotate-tokens-pp.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-05-04 00:14:37 +0000
committerDouglas Gregor <dgregor@apple.com>2011-05-04 00:14:37 +0000
commitdd3e5549e3c11e217078938aacf72f042eea5343 (patch)
treee73841fdb4c17d4e570cb45d48e7a29307b909aa /test/Index/annotate-tokens-pp.c
parentd808bd2978bd4ac95a92b309b038452b533fd7a0 (diff)
Introduce a new libclang API, clang_isFileMultipleIncludeGuarded(),
which determines whether a particular file is actually a header that is intended to be guarded from multiple inclusions within the same translation unit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130808 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Index/annotate-tokens-pp.c')
-rw-r--r--test/Index/annotate-tokens-pp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/Index/annotate-tokens-pp.c b/test/Index/annotate-tokens-pp.c
index 3dd9ffeddc..01a615f0e4 100644
--- a/test/Index/annotate-tokens-pp.c
+++ b/test/Index/annotate-tokens-pp.c
@@ -25,7 +25,10 @@ void test() {
fun_with_macro_bodies(x, { int z = x; ++z; });
}
-// RUN: c-index-test -test-annotate-tokens=%s:2:1:26:1 -I%S/Inputs %s | FileCheck %s
+#include "pragma-once.h"
+#include "guarded.h"
+
+// RUN: c-index-test -test-annotate-tokens=%s:2:1:30:1 -I%S/Inputs %s | FileCheck %s
// CHECK: Punctuation: "#" [2:1 - 2:2] preprocessing directive=
// CHECK: Identifier: "define" [2:2 - 2:8] preprocessing directive=
// CHECK: Identifier: "STILL_NOTHING" [2:9 - 2:22] macro definition=STILL_NOTHING
@@ -184,4 +187,5 @@ void test() {
// CHECK: Punctuation: ")" [25:47 - 25:48] UnexposedStmt=
// CHECK: Punctuation: ";" [25:48 - 25:49] UnexposedStmt=
// CHECK: Punctuation: "}" [26:1 - 26:2] UnexposedStmt=
-
+// CHECK: {{28:1.*inclusion directive=pragma-once.h.*multi-include guarded}}
+// CHECK: {{29:1.*inclusion directive=guarded.h.*multi-include guarded}}