[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-18 Thread Eric Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL342451: [Index] Add an option to collect macros from preprocesor. (authored by ioeric, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D52098 File

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-18 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: unittests/Index/IndexTests.cpp:61 +S.Roles = Roles; +if (MI) + S.Info = getSymbolInfoForMacro(*MI); ilya-biryukov wrote: > ioeric wrote: > > ilya-biryukov wrote: > > > Can this actually happen? It seems weird

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-18 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM Comment at: include/clang/Index/IndexingAction.h:59 /// Recursively indexes \p Decls. -/// Note that this does not index macros. -void indexTopLevelDecls(

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: include/clang/Index/IndexingAction.h:44 bool IndexImplicitInstantiation = false; + bool IndexMacrosInPreprocessor = false; }; ilya-biryukov wrote: > Maybe add a comment or change a name to indicate that this currentl

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-17 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 165761. ioeric marked 4 inline comments as done. ioeric added a comment. - addressed review comments. Repository: rC Clang https://reviews.llvm.org/D52098 Files: include/clang/Index/IndexingAction.h lib/Index/IndexingAction.cpp unittests/CMakeLists.

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-17 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Overall LG, see the major comment about running without the preprocessor. Comment at: include/clang/Index/IndexingAction.h:44 bool IndexImplicitInstantiation = false; + bool IndexMacrosInPreprocessor = false; }; Maybe add a c

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 165516. ioeric added a comment. - another cleanup... Repository: rC Clang https://reviews.llvm.org/D52098 Files: include/clang/Index/IndexingAction.h lib/Index/IndexingAction.cpp unittests/CMakeLists.txt unittests/Index/CMakeLists.txt unittests/

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 165514. ioeric added a comment. - remove debug message. Repository: rC Clang https://reviews.llvm.org/D52098 Files: include/clang/Index/IndexingAction.h lib/Index/IndexingAction.cpp unittests/CMakeLists.txt unittests/Index/CMakeLists.txt unittes

[PATCH] D52098: [Index] Add an option to collect macros from preprocesor.

2018-09-14 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. ioeric added a reviewer: ilya-biryukov. Herald added subscribers: cfe-commits, mgorny. Also added unit tests for the index library; lit+c-index-test is painful... Repository: rC Clang https://reviews.llvm.org/D52098 Files: include/clang/Index/IndexingAction.h