[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG75ae784e8f49: [clangd] #undef macros inside preamble patch (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143093/new/

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-08 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 495891. kadircet marked 3 inline comments as done. kadircet added a comment. - Use raw strings - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143093/new/ https://reviews.llvm.org/D143093 Files:

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-08 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Preamble.cpp:216 unsigned Offset; + tok::PPKeywordKind Directive; + // Name of the macro being defined in the case of a

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-07 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 495409. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143093/new/ https://reviews.llvm.org/D143093 Files: clang-tools-extra/clangd/Preamble.cpp

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 495185. kadircet added a comment. - Update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143093/new/ https://reviews.llvm.org/D143093 Files: clang-tools-extra/clangd/Preamble.cpp

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/Preamble.cpp:721 + // re-definition warnings. + if (TD.Directive == tok::pp_define) +Patch << "#undef " << TD.MacroName << '\n'; i know we've discussed emitting all the

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-03 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D143093#4099623 , @sammccall wrote: > I can't understand from the description, code, or testcases what problem this > is fixing. Can you clarify, ideally by improving the testcases? Yeah should've elaborated on this one. As

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I can't understand from the description, code, or testcases what problem this is fixing. Can you clarify, ideally by improving the testcases? It seems to introduce a false negative in the case that the preamble *does* contain a definition of an already-defined macro,

[PATCH] D143093: [clangd] #undef macros inside preamble patch

2023-02-01 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added a subscriber: arphaman. Herald added a project: All. kadircet requested review of this revision. Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. That way we