forked from facebookincubator/Glean
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a couple of tests to demonstrate issues with cxx1.DeclarationTargets
Summary: See D56349548 Reviewed By: phlalx Differential Revision: D56628360 fbshipit-source-id: af8caa0b0264355c7d51fe46e206020ce12171f0
- Loading branch information
1 parent
d995c71
commit f1ecc67
Showing
9 changed files
with
986 additions
and
0 deletions.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
...ng/clang/tests/regression_derive-function-calls/simple/lambda/cxx1.DeclarationSources.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,53 @@ | ||
[ | ||
"@generated", | ||
{ | ||
"key": { | ||
"sources": [ | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "g" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 11, | ||
"lineEnd": 13 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"target": { | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "f" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 11, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 9, | ||
"lineEnd": 9 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
53 changes: 53 additions & 0 deletions
53
...ng/clang/tests/regression_derive-function-calls/simple/lambda/cxx1.DeclarationTargets.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,53 @@ | ||
[ | ||
"@generated", | ||
{ | ||
"key": { | ||
"source": { | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "g" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 11, | ||
"lineEnd": 13 | ||
} | ||
} | ||
} | ||
}, | ||
"targets": [ | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "f" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 11, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 9, | ||
"lineEnd": 9 | ||
} | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
] |
13 changes: 13 additions & 0 deletions
13
glean/lang/clang/tests/regression_derive-function-calls/simple/lambda/test.cpp
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,13 @@ | ||
/* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
void f() {} | ||
|
||
void g() { | ||
auto h = [&]() { f(); }; | ||
} |
191 changes: 191 additions & 0 deletions
191
...ng/clang/tests/regression_derive-function-calls/simple/macros/cxx1.DeclarationSources.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,191 @@ | ||
[ | ||
"@generated", | ||
{ | ||
"key": { | ||
"sources": [ | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "f" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "g" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "h" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"target": { | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "f" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"key": { | ||
"sources": [ | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "f" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "g" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
}, | ||
{ | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "h" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
} | ||
], | ||
"target": { | ||
"function_": { | ||
"key": { | ||
"name": { | ||
"key": { | ||
"name": { "key": { "name": { "key": "g" } } }, | ||
"scope": { "global_": { } } | ||
} | ||
}, | ||
"signature": { | ||
"key": { "parameters": [ ], "returns": { "key": "void" } } | ||
}, | ||
"source": { | ||
"columnBegin": 1, | ||
"columnEnd": 1, | ||
"file": { "key": "test.cpp" }, | ||
"lineBegin": 14, | ||
"lineEnd": 14 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
] |
Oops, something went wrong.