[PATCH] D44000: [clang] Fix use-after-free on code completion

2018-03-02 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL326569: [clang] Fix use-after-free on code completion (authored by ibiryukov, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D44000 Files: clan

[PATCH] D44000: [clang] Fix use-after-free on code completion

2018-03-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 136714. ilya-biryukov marked 7 inline comments as done. ilya-biryukov added a comment. Addressed review comments Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44000 Files: clangd/CodeComplete.cpp Index: clangd/CodeComplete.cpp ===

[PATCH] D44000: [clang] Fix use-after-free on code completion

2018-03-02 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. This feels like a bug in the underlying clang libraries, but since none of the lifetimes are documented and everyone just does it this way... Comment at: clangd/CodeCo

[PATCH] D44000: [clang] Fix use-after-free on code completion

2018-03-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 136710. ilya-biryukov added a comment. Remove a trace for "sema cleanup", it is not very informative now that we run the callback under the "sema completion" trace Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44000 Files: clangd/

[PATCH] D44000: [clang] Fix use-after-free on code completion

2018-03-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 136707. ilya-biryukov added a comment. Remove code refactoring from the patch. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44000 Files: clangd/CodeComplete.cpp Index: clangd/CodeComplete.cpp =

[PATCH] D44000: [clang] Fix use-after-free on code completion

2018-03-02 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov created this revision. ilya-biryukov added a reviewer: sammccall. Herald added subscribers: ioeric, jkorous-apple, klimek. Found by asan. Fiddling with code completion AST after FrontendAction::Exceute can lead to errors. Calling the callback in ProcessCodeCompleteResults to make sur