This is an archive of the discontinued LLVM Phabricator instance.

[include-fixer] Added find-stl-symbols to retrieve symbols (with the correct include header name) from C++ standard STL headers.
AbandonedPublic

Authored by ioeric on May 20 2016, 3:24 PM.

Details

Reviewers
klimek
bkramer
Summary

Added find-stl-symbols to retrieve symbols (with the correct include header name) from C++ standard STL headers.

Some known issues:

  • Some symbols can have wrong but working include headers. For example, "allocator" has header name <string> while it should be exported by <memory> according to the standard.
  • GNU C symbols like pthread_* with header <memory> are also retrieved.

Diff Detail

Event Timeline

ioeric updated this revision to Diff 58007.May 20 2016, 3:24 PM
ioeric retitled this revision from to STL symbols. DO NOT USE THIS FOR REVIEW!.
ioeric updated this object.
ioeric updated this revision to Diff 58037.May 21 2016, 5:13 AM

: - Added find-stl-symbols tool; to be tested.

ioeric updated this revision to Diff 58078.May 23 2016, 2:45 AM
  • Fixed commenting.
ioeric updated this revision to Diff 58080.May 23 2016, 3:06 AM
  • Fixed more commenting.
ioeric retitled this revision from STL symbols. DO NOT USE THIS FOR REVIEW! to [include-fixer] Added find-stl-symbols to retrieve symbols (with the correct include header name) from C++ standard STL headers..May 23 2016, 3:13 AM
ioeric updated this object.
ioeric added reviewers: bkramer, klimek.
ioeric added subscribers: hokein, cfe-commits.
ioeric updated this revision to Diff 58081.May 23 2016, 3:15 AM
  • removed redundant dependency for findAllSymbols.
bkramer added inline comments.May 23 2016, 7:29 AM
include-fixer/find-all-symbols/FindAllSymbols.h
47

overridden

include-fixer/find-all-symbols/SymbolReporter.h
25

Any reason not to call this IncludeDepth? Or make it a generic 'Priority' thing and throw away all the overrides? I'm not opposed to changing find-all-symbols to support that if it's less code.

include-fixer/find-stl-symbols/FindSTLSymbolsAction.h
13

The .. in the include path is a strong indicator that we have weird layering. Would it make sense to merge find-stl-symbols into find-all-symbols?

include-fixer/find-stl-symbols/STLSymbolsFinder.cpp
33

.back()

include-fixer/find-stl-symbols/tool/FindSTLSymbolsMain.cpp
57

Just use the raw_fd_ostream constructor that takes a file name.

hokein added inline comments.May 23 2016, 7:33 AM
include-fixer/find-stl-symbols/STLSymbolsFinder.h
26

s/headear/header

98

s/wether/whether

include-fixer/find-stl-symbols/tool/FindSTLSymbolsMain.cpp
32

It would be clearer to add an example path here.

37

Using underscore stl_symbols_db.yaml to keep consistence with find_all_symbols_db.yaml.

ioeric abandoned this revision.Dec 19 2017, 5:54 AM
ioeric marked 7 inline comments as done.