[PATCH] D138047: Fix use of dangling stack allocated string in IncludeFixer

2022-11-16 Thread David Goldman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2d5c4b8f6e04: Fix use of dangling stack allocated string in IncludeFixer (authored by dgoldman). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138047/new/ h

[PATCH] D138047: Fix use of dangling stack allocated string in IncludeFixer

2022-11-16 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! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138047/new/ https://reviews.llvm.org/D138047

[PATCH] D138047: Fix use of dangling stack allocated string in IncludeFixer

2022-11-16 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. In D138047#3930211 , @kadircet wrote: > yeah unfortunately testing this is hard, but bug&fix are obvious so it's fine > to land without a test. > > but i think we should rather fix the broken call site at > clang-tools-extra/cl

[PATCH] D138047: Fix use of dangling stack allocated string in IncludeFixer

2022-11-16 Thread David Goldman via Phabricator via cfe-commits
dgoldman updated this revision to Diff 475850. dgoldman added a comment. Fix in ParsedAST.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138047/new/ https://reviews.llvm.org/D138047 Files: clang-tools-extra/clangd/ParsedAST.cpp Index: clang

[PATCH] D138047: Fix use of dangling stack allocated string in IncludeFixer

2022-11-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. yeah unfortunately testing this is hard, but bug&fix are obvious so it's fine to land without a test. but i think we should rather fix the broken call site at clang-tools-extra/clangd/ParsedAST.cpp and move `BuildDir` to outer scope where it'll outlive IncludeFixer (~

[PATCH] D138047: Fix use of dangling stack allocated string in IncludeFixer

2022-11-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman added a comment. LMK of the best way to add a test for this, maybe I can somehow make a test with relative path arguments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D138047/new/ https://reviews.llvm.org/D138047 ___

[PATCH] D138047: Fix use of dangling stack allocated string in IncludeFixer

2022-11-15 Thread David Goldman via Phabricator via cfe-commits
dgoldman created this revision. dgoldman added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. dgoldman requested review of this revision. Herald added a project: clang-tools-extra. Herald added a subscriber: cfe-commits. IncludeFixer uses this BuildDir stri