-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cxx_indexer): whitelist and test std::make_shared (#4059)
* fix(cxx_indexer): whitelist and test std::make_shared * chore: add comment to make_shared_library test
- Loading branch information
Showing
4 changed files
with
32 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
21 changes: 21 additions & 0 deletions
21
kythe/cxx/indexer/cxx/testdata/libraries/make_shared_factories.cc
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,21 @@ | ||
#include <memory> | ||
|
||
//- @B defines/binding StructB | ||
struct B { | ||
//- @B defines/binding ConsB1 | ||
explicit B(int, void*); | ||
//- @B defines/binding ConsB2 | ||
explicit B(char); | ||
}; | ||
|
||
void f() { | ||
//- @B ref StructB | ||
//- @"make_shared<B>" ref ConsB1 | ||
//- @"std::make_shared<B>(1, nullptr)" ref/call ConsB1 | ||
std::make_shared<B>(1, nullptr); | ||
|
||
//- @B ref StructB | ||
//- @"make_shared<B>" ref ConsB2 | ||
//- @"std::make_shared<B>('a')" ref/call ConsB2 | ||
std::make_shared<B>('a'); | ||
} |
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