-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cxx_indexer): support decayed types (#5852)
Use the new type when we encounter a decayed/adjusted type (unless it's null, then try the old one). NB: according to clang's documentation, an adjusted type is "a type which was implicitly adjusted by the semantic engine for arbitrary reasons"
- Loading branch information
Showing
4 changed files
with
52 additions
and
2 deletions.
There are no files selected for viewing
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
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
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
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,26 @@ | ||
// We support decayed types. | ||
void i() { | ||
//- @i ref FnI | ||
//- FnI typed TyI | ||
//- @j defines/binding VarJ | ||
//- VarJ typed TyJ | ||
auto j = i; | ||
//- @k defines/binding VarK | ||
//- VarK typed TyK | ||
int k[1] = {1}; | ||
//- @l defines/binding VarL | ||
//- VarL typed TyL | ||
auto* l = k; | ||
} | ||
//- @TFnVoidVoid defines/binding AliasFVV | ||
//- AliasFVV aliases TyI | ||
using TFnVoidVoid = decltype(i); | ||
//- @TPtrFnVoidVoid defines/binding AliasPFVV | ||
//- AliasPFVV aliases TyJ | ||
using TPtrFnVoidVoid = decltype(i)*; | ||
//- @TCArrInt defines/binding AliasCAI | ||
//- AliasCAI aliases TyK | ||
using TCArrInt = int[1]; | ||
//- @TPtrInt defines/binding AliasPI | ||
//- AliasPI aliases TyL | ||
using TPtrInt = int*; |