From 63537872aefe845ba40770112d0a2cf0927f27b8 Mon Sep 17 00:00:00 2001 From: QuietMisdreavus Date: Tue, 14 Nov 2023 04:46:12 -0700 Subject: ExtractAPI: use zero-based indices for line/column in symbol graph (#71753) Other implementations of the symbol graph format use zero-based indices for source locations, which causes problems when combined with clang's current one-based indices. This commit sets ExtractAPI's symbol graph output to use zero-based indices to align with other implementations. rdar://107639783 --- clang/test/ExtractAPI/known_files_only.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'clang/test/ExtractAPI/known_files_only.c') diff --git a/clang/test/ExtractAPI/known_files_only.c b/clang/test/ExtractAPI/known_files_only.c index 1e51139..68881aa 100644 --- a/clang/test/ExtractAPI/known_files_only.c +++ b/clang/test/ExtractAPI/known_files_only.c @@ -82,8 +82,8 @@ struct Foo { int a; }; }, "location": { "position": { - "character": 5, - "line": 1 + "character": 4, + "line": 0 }, "uri": "file://INPUT_DIR/input1.h" }, -- cgit v1.1