-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add codemarkup.TargetUses for pp1.Define uses
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
1 parent
a3ee732
commit 0b9175f
Showing
14 changed files
with
1,388 additions
and
4 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
glean/glass/test/regression/tests/cpp/findReferenceRanges_macro.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
] | ||
] |
2 changes: 2 additions & 0 deletions
2
glean/glass/test/regression/tests/cpp/findReferenceRanges_macro.query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
action: findReferenceRanges | ||
args: "test/pp/define/test2.h/FOO" |
4 changes: 4 additions & 0 deletions
4
glean/glass/test/regression/tests/cpp/findReferenceRanges_macro_2.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
"@generated", | ||
[] | ||
] |
2 changes: 2 additions & 0 deletions
2
glean/glass/test/regression/tests/cpp/findReferenceRanges_macro_2.query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
action: findReferenceRanges | ||
args: "test/pp/define/test.cpp/A" |
1 change: 1 addition & 0 deletions
1
glean/lang/clang/tests/regression/preprocessor/define_use.query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
query: pp1.DefineUse _ |
75 changes: 75 additions & 0 deletions
75
glean/lang/clang/tests/regression/preprocessor/ifdef/define_use.out
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } | ||
} | ||
} | ||
} | ||
} | ||
] |
Oops, something went wrong.