Граф коммитов

3 Коммитов

Автор SHA1 Сообщение Дата
Haojian Wu 4189dec580 [find-all-symbols] Slim SymbolInfo.
Summary:
SymbolInfo has some optional fields, which is a bad-smell
implementation. For now, we

* remove the optional field since we don't need them (we can probably
  add them back if we actually need them in the future)
* make SymbolInfo to be a class.

By this change, the code is more simplified.

Reviewers: klimek

Subscribers: cfe-commits, ioeric, bkramer

Differential Revision: http://reviews.llvm.org/D20095

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@269162 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 08:38:21 +00:00
Eric Liu b2d99deda3 Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.
Summary: Added XrefsDBManager into include-fixer and made XrefsDB return SymbolInfo.

Reviewers: hokein, djasper, klimek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D19869

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@268480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-04 08:22:35 +00:00
Benjamin Kramer cf8ed12c68 [include-fixer] Add a prototype for a new include fixing tool.
Summary:
The goal of this tool is fairly simple, look up unknown identifiers in a
global database and add the corresponding #include line. It accomplishes
this by hooking into Sema as an ExternalSemaSource and responding to typo
correction callbacks. This means we can see the unknown identifier before
it's being munged by error recovery.

This doesn't work perfectly yet as some typo corrections don't emit
callbacks (delayed typos), but I think this is fixable. We also handle
only one include at a time as this is meant to be run directly from
the editing environment eventually. Adding multiple includes at the same
time is tricky because of error recovery.

This version only has a a dummy database, so all you can do is fixing
missing includes of <string>, but the indexer to build a database will
follow soon.

Reviewers: djasper

Subscribers: ioeric, hokein, cfe-commits

Differential Revision: http://reviews.llvm.org/D19314

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@266870 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-20 12:43:43 +00:00