Skip to content

Commit

Permalink
Fix bug in search record/namespace term builder for depth 2
Browse files Browse the repository at this point in the history
Summary: oops typo. And no specific test for that case.

Reviewed By: pepeiborra

Differential Revision: D68191642

fbshipit-source-id: 640a83835c49a9f8644f37a7dd8e25c60ef2ed78
  • Loading branch information
donsbot authored and facebook-github-bot committed Jan 15, 2025
1 parent f0e0aa0 commit d8b11e3
Show file tree
Hide file tree
Showing 3 changed files with 105 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,97 @@
[ "@generated" ]
[
"@generated",
{
"key": {
"searchcase": 0,
"name": "fooCInBinB",
"scope": [ "classBinNSB", "classCinNSB" ],
"entity": {
"cxx": {
"defn": {
"function_": {
"key": {
"declaration": {
"key": {
"name": {
"key": {
"name": { "key": { "name": { "key": "fooCInBinB" } } },
"scope": {
"recordWithAccess": {
"record": {
"key": {
"name": { "key": "classCinNSB" },
"scope": {
"recordWithAccess": {
"record": {
"key": {
"name": { "key": "classBinNSB" },
"scope": {
"namespace_": {
"key": {
"name": { "key": "NsB" },
"parent": {
"key": {
"name": { "key": "NsA" }
}
}
}
}
}
}
},
"access": 2
}
}
}
},
"access": 2
}
}
}
},
"signature": {
"key": { "returns": { "key": "int" }, "parameters": [ ] }
},
"method": {
"isVirtual": false,
"isConst": false,
"isVolatile": false,
"refQualifier": 0
},
"source": {
"file": { "key": "test.cpp" },
"lineBegin": 21,
"columnBegin": 9,
"lineEnd": 21,
"columnEnd": 39
}
}
},
"isInline": false
}
}
}
}
},
"location": {
"name": "fooCInBinB",
"file": { "key": "test.cpp" },
"location": {
"range": {
"file": { "key": "test.cpp" },
"lineBegin": 21,
"columnBegin": 9,
"lineEnd": 21,
"columnEnd": 39
}
},
"destination": {
"file": { "key": "test.cpp" },
"span": { "start": 427, "length": 10 }
}
},
"kind": 13,
"language": 0
}
}
]
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"@generated": null,
"facts_searched": { "cxx1.Name.5": 5, "cxx1.QName.5": 1 },
"facts_searched": {
"cxx1.DeclarationNameSpan.5": 1,
"cxx1.FunctionDeclarationByNameScope.5": 1,
"cxx1.FunctionDefinition.5": 1,
"cxx1.Name.5": 5,
"cxx1.QName.5": 1
},
"full_scans": [ ]
}
2 changes: 1 addition & 1 deletion glean/schema/source/search.cxx.angle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ predicate QueryToQNameCase:
{ name = AName, scope =
{ namespace_ = { name = { just = BNameNS } } } }
) | (
CxxRecordCase { Case, A, BNameR };
CxxRecordCase { Case, B, BNameR };
{ name = AName, scope =
{ recordWithAccess = { record = { name = BNameR } } } }
)
Expand Down

0 comments on commit d8b11e3

Please sign in to comment.