From 37aa4938c8b59db704d4b9c9fed7d6e5e6583bbe Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Wed, 4 May 2011 00:14:37 +0000 Subject: 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. llvm-svn: 130808 --- clang/test/Index/annotate-tokens-pp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'clang/test/Index/annotate-tokens-pp.c') diff --git a/clang/test/Index/annotate-tokens-pp.c b/clang/test/Index/annotate-tokens-pp.c index 3dd9ffeddcb..01a615f0e4c 100644 --- a/clang/test/Index/annotate-tokens-pp.c +++ b/clang/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}} -- cgit v1.2.3