Skip to content

Commit

Permalink
Add codemarkup.TargetUses for pp1.Define uses
Browse files Browse the repository at this point in the history
Summary: This is sufficient for first level uses of #defines to be found via find-refs

Reviewed By: phlalx

Differential Revision: D48105515

fbshipit-source-id: 162adf784d6f861b86b348ee6946863bdb71b15b
  • Loading branch information
donsbot authored and facebook-github-bot committed Aug 7, 2023
1 parent a3ee732 commit 0b9175f
Show file tree
Hide file tree
Showing 14 changed files with 1,388 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[
"@generated",
[
{
"filepath": "test.cpp",
"range": {
"columnBegin": 14,
"columnEnd": 17,
"lineBegin": 25,
"lineEnd": 25
},
"repository": "test"
}
]
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
action: findReferenceRanges
args: "test/pp/define/test2.h/FOO"
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"@generated",
[]
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
action: findReferenceRanges
args: "test/pp/define/test.cpp/A"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
query: pp1.DefineUse _
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[
"@generated",
{
"key": {
"define": {
"key": {
"macro": { "key": "IFDEF1" },
"source": {
"file": { "key": "test.cpp" },
"lineBegin": 9,
"columnBegin": 9,
"lineEnd": 9,
"columnEnd": 14
}
}
},
"use": {
"key": {
"macro": { "key": "IFDEF1" },
"name": { "begin": 259, "end": 265 },
"definition": {
"file": { "key": "test.cpp" },
"line": 9,
"column": 9
},
"expand": false,
"source": {
"file": { "key": "test.cpp" },
"lineBegin": 12,
"columnBegin": 8,
"lineEnd": 12,
"columnEnd": 14
},
"nameSpan": { "start": 259, "length": 6 }
}
}
}
},
{
"key": {
"define": {
"key": {
"macro": { "key": "IFDEF2" },
"source": {
"file": { "key": "test.cpp" },
"lineBegin": 10,
"columnBegin": 9,
"lineEnd": 10,
"columnEnd": 14
}
}
},
"use": {
"key": {
"macro": { "key": "IFDEF2" },
"name": { "begin": 307, "end": 313 },
"definition": {
"file": { "key": "test.cpp" },
"line": 10,
"column": 9
},
"expand": false,
"source": {
"file": { "key": "test.cpp" },
"lineBegin": 18,
"columnBegin": 9,
"lineEnd": 18,
"columnEnd": 15
},
"nameSpan": { "start": 307, "length": 6 }
}
}
}
}
]
Loading

0 comments on commit 0b9175f

Please sign in to comment.