Skip to content

Commit 960a20f

Browse files
committed
[clang][deps] Upstream tests for libclang API
Original author: Alex Lorenz <[email protected]> (cherry-picked from commit 1582bf1)
1 parent b5626c0 commit 960a20f

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: not c-index-test core -scan-deps %S -- clang_tool %s -I %S/Inputs 2>&1 | FileCheck %s
2+
3+
#include "missing.h"
4+
5+
// CHECK: error: failed to get dependencies
6+
// CHECK-NEXT: 'missing.h' file not found
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: c-index-test core -scan-deps %S -- clang_tool %s -I %S/Inputs | FileCheck %s
2+
3+
#include "header.h"
4+
5+
// CHECK: file-deps:
6+
// CHECK-NEXT: flags-c-api.cpp
7+
// CHECK-NEXT: Inputs/header.h
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// RUN: c-index-test core -scan-deps %S -- clang_tool -Dmz -mllvm -asan-instrumentation-with-call-threshold=0 -mllvm -asan-instrumentation-with-call-threshold=0 %s -I %S/Inputs | FileCheck %s
2+
3+
#ifdef mz
4+
#include "header.h"
5+
#endif
6+
7+
// CHECK: file-deps:
8+
// CHECK-NEXT: mllvm-double-option-error-c-api.c
9+
// CHECK-NEXT: Inputs/header.h
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: c-index-test core -scan-deps %S -- clang_tool %s -I %S/Inputs | FileCheck %s
2+
3+
#include "header.h"
4+
5+
// CHECK: file-deps:
6+
// CHECK-NEXT: simple-c-api.cpp
7+
// CHECK-NEXT: Inputs/header.h

0 commit comments

Comments
 (0)