[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE359880: [clangd] Fix header-guard check for include insertion, and dont index header… (authored by sammccall, committed by ). Changed prior to commit:

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clangd/index/SymbolCollector.h:130 + // The final spelling is calculated in finish(). + llvm::DenseMap IncludeFiles; + // Indexed macros, to be erased if they turned out to be include guards. sammccall wrote: >

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/index/SymbolCollector.h:130 + // The final spelling is calculated in finish(). + llvm::DenseMap IncludeFiles; + // Indexed macros, to be erased if they turned out to be include guards. kadircet wrote: > This

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 197967. sammccall marked 3 inline comments as done. sammccall added a comment. Extract setIncludeLocation() and call it from a more obvious point in the code. Tweak test to make it harder. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. Thanks! mostly LGTM, only confused about changing symbolcollector to produce a unique header per symbol(where as it was(could) produce multiple headers before). What is the rationale

[PATCH] D61442: [clangd] Fix header-guard check for include insertion, and don't index header guards.

2019-05-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: kadircet. Herald added subscribers: cfe-commits, arphaman, mgrang, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Both of these attempt to check whether a header guard exists while parsing the file. However the file is