[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG0ce3c7111e90: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 379663. kbobyrev added a comment. Fix comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111698/new/ https://reviews.llvm.org/D111698 Files: clang-tools-extra/clangd/IncludeCleaner.cpp clang-tools-ext

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 379661. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Resolve review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111698/new/ https://reviews.llvm.org/D111698 Files: clang-

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-14 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 379625. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Stash Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111698/new/ https://reviews.llvm.org/D111698 Files: clang-tools-extra/clangd/

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added a comment. This revision is now accepted and ready to land. LG with the new test Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:124 const auto &Exp = SM.getSLocEntry(FID).getExpansion(); -add(Exp.getSpellingLoc

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/unittests/IncludeCleanerTests.cpp:170 +TEST(IncludeCleaner, ScratchBuffer) { + TestTU TU; sammccall wrote: > this doesn't seem to test very much, a comment should indicate that this is > gua

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 379366. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111698/new/ https://reviews.llvm.org/D111698 Files: clang-

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/IncludeCleaner.cpp:124 const auto &Exp = SM.getSLocEntry(FID).getExpansion(); -add(Exp.getSpellingLoc()); +if (!SM.isWrittenInScratchSpace(Exp.getSpellingLoc())) + add(Exp.getSpellingLoc()); -

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 379318. kbobyrev added a comment. Rename the test to have more meaning. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111698/new/ https://reviews.llvm.org/D111698 Files: clang-tools-extra/clangd/IncludeClea

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 379317. kbobyrev added a comment. Mention the ScratchBuffer explicitly in the test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D111698/new/ https://reviews.llvm.org/D111698 Files: clang-tools-extra/clangd

[PATCH] D111698: [clangd] IncludeCleaner: Handle macros coming from ScratchBuffer

2021-10-13 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: sammccall. Herald added subscribers: usaxena95, arphaman. kbobyrev requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Repository: rG LLVM Github Mo