[PATCH] D144721: [Tooling/Inclusion] Add the generic abs symbol to the table.

2023-02-24 Thread Haojian Wu 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 rG4416e4a9ed06: [Tooling/Inclusion] Add the generic abs symbol to the table. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D144721: [Tooling/Inclusion] Add the generic abs symbol to the table.

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D144721#4150122 , @kadircet wrote: > this fixes the `abs` in the mentioned issue, but leaves the friends out :( > those are specifically `std::labs, std::llabs, std::imaxabs` These symbols are already covered in the generated

[PATCH] D144721: [Tooling/Inclusion] Add the generic abs symbol to the table.

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Fixes https://github.com/llvm/llvm-project/issues/60964 Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D144721

[PATCH] D144713: [Tooling/Includsion] Add the missing NULL symbol to the table.

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rGc86f05dd48d2: [Tooling/Inclusion] Add the missing NULL symbol to the table. (authored by hokein).

[PATCH] D144713: [Tooling/Includsion] Add the missing NULL symbol to the table.

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 500126. hokein added a comment. oops, fix the patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144713/new/ https://reviews.llvm.org/D144713 Files:

[PATCH] D144713: [Tooling/Includsion] Add the missing NULL symbol to the table.

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D144713 Files:

[PATCH] D144703: [clangd] Avoid using CompletionItemKind.Text for macro completions

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks, this looks an improvement to me! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144703/new/ https://reviews.llvm.org/D144703

[PATCH] D144708: [clangd] Fix UB in scanPreamble

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Preamble.cpp:351 auto PreambleContents = - llvm::MemoryBuffer::getMemBufferCopy(Contents.substr(0, Bounds.Size)); +

[PATCH] D144646: [Tooling][Inclusions] Add c-header and global namespace alternatives for size_t

2023-02-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein 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/D144646/new/ https://reviews.llvm.org/D144646

[PATCH] D144484: [Tooling/Inclusion] Handle std::get symbol.

2023-02-23 Thread Haojian Wu 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 rGcbcb3eef70de: [Tooling/Inclusion] Handle std::get symbol. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D144579: [include-cleaner] Check macros against stdlib database

2023-02-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, good catch! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144579/new/ https://reviews.llvm.org/D144579

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-22 Thread Haojian Wu 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 rG341dd6076b12: [Lex] Fix a crash in updateConsecutiveMacroArgTokens. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-22 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 499405. hokein marked 2 inline comments as done. hokein added a comment. address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144054/new/ https://reviews.llvm.org/D144054 Files:

[PATCH] D144484: [Tooling/Inclusion] Handle std::get symbol.

2023-02-21 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, clang-tools-extra. Currently, we handle it as a symbol without a header. In general, for the

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Lex/TokenLexer.cpp:1023 Partition = All.take_while([&](const Token ) { - return T.getLocation() >= BeginLoc && T.getLocation() < Limit && - NearLast(T.getLocation()); + // NOTE: the Limit is included!

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/test/Lexer/update_consecutive_macro_crash.cpp:8 +void foo() { + X(int{,}); // expected-error {{too many arguments provided to function-like macro invocation}} \ + expected-error {{expected expression}} \

[PATCH] D144054: [Lex] Fix a crash in updateConsecutiveMacroArgTokens.

2023-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Fixes https://github.com/llvm/llvm-project/issues/60722. Repository: rG LLVM Github Monorepo

[PATCH] D143906: [include-cleaner] Better support ambiguous std symbols

2023-02-14 Thread Haojian Wu 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 rG504aa8ae941e: [include-cleaner] Better support ambiguous std symbols (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D143906: [include-cleaner] Better support ambiguous std symbols

2023-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added a comment. Thanks for the review! Comment at: clang-tools-extra/include-cleaner/lib/FindHeaders.cpp:85 +Hints isPublicHeader(const FileEntry *FE, const PragmaIncludes *PI) { + return (PI->isPrivate(FE) ||

[PATCH] D143906: [include-cleaner] Better support ambiguous std symbols

2023-02-14 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 497233. hokein marked 2 inline comments as done. hokein added a comment. handle the case where PI is null. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143906/new/ https://reviews.llvm.org/D143906 Files:

[PATCH] D143906: [include-cleaner] Better support ambiguous std symbols

2023-02-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/include-cleaner/lib/FindHeaders.cpp:174 const PragmaIncludes *PI) { + if (auto Headers = specialStandardSymbols(S); !Headers.empty()) +return Headers;

[PATCH] D143906: [include-cleaner] Better support ambiguous std symbols

2023-02-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 497110. hokein marked 3 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143906/new/ https://reviews.llvm.org/D143906 Files:

[PATCH] D143906: [include-cleaner] Better support ambiguous std symbols

2023-02-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang-tools-extra. By special-casing them at the moment. The tooling stdlib lib doesn't support these symbols (most important one is

[PATCH] D143640: [Tooling/Inclusion] Support overload symbols in the stdlib.

2023-02-13 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for the comment, putting more thoughts. In D143640#4121998 , @kadircet wrote: > All this complexity for handling only 4 symbols feels wrong. is this the > whole set? are there any other symbols that fall under this class?

[PATCH] D143559: [Tooling/Inclusion] Use the StdSpecialSymbolMap.inc in the stdlib

2023-02-09 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rG11dcd88577f4: [Tooling/Inclusion] Use the StdSpecialSymbolMap.inc in the stdlib (authored by hokein).

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-09 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGc812ab731243: [include-mapping] Add C-compatibility symbol entries. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:218 + if (!D) // global scope. +return getMappingPerLang(L)->NamespaceSymbols->lookup(""); auto It = NamespaceCache.find(D); kadircet wrote: > oh i actually

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 496102. hokein added a comment. address comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/ https://reviews.llvm.org/D143214 Files: clang-tools-extra/clangd/unittests/StdLibTests.cpp

[PATCH] D143640: [Tooling/Inclusion] Support overload symbols in the stdlib.

2023-02-09 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, clang-tools-extra. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D143640

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/unittests/StdLibTests.cpp:37 EXPECT_THAT(CXX, HasSubstr("#include ")); - EXPECT_THAT(CXX, Not(HasSubstr("#include "))); + EXPECT_THAT(CXX, HasSubstr("#include ")); kadircet wrote: > hokein

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495910. hokein marked 3 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/ https://reviews.llvm.org/D143214 Files:

[PATCH] D143569: [Tooling/Inclusions] Add more multi-header symbols to StdSpecialSymbolMap.inc

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rG98e7670b64d8: [Tooling/Inclusion] Add more multi-header symbols to StdSpecialSymbolMap.inc (authored by

[PATCH] D143569: [Tooling/Inclusions] Add more multi-header symbols to StdSpecialSymbolMap.inc

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D143569 Files:

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/unittests/StdLibTests.cpp:37 EXPECT_THAT(CXX, HasSubstr("#include ")); - EXPECT_THAT(CXX, Not(HasSubstr("#include "))); + EXPECT_THAT(CXX, HasSubstr("#include ")); This is a behavior

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495776. hokein added a comment. Herald added a subscriber: arphaman. Herald added a project: clang-tools-extra. fix the clangd unittest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495771. hokein added a comment. update the standard-library tests, and fix a bug. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/ https://reviews.llvm.org/D143214 Files:

[PATCH] D143559: [Tooling/Inclusion] Use the StdSpecialSymbolMap.inc in the stdlib

2023-02-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added a subscriber: ilya-biryukov. Herald added projects: clang, clang-tools-extra. Remove a special-case in clangd.

[PATCH] D143399: [Tooling/Inclusion] Move the generated mapping .inc file to private places.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D143399#4111235 , @hokein wrote: > In D143399#4110806 , @augusto2112 > wrote: > >> Hi @hokein, this broke the LLDB incremental build >>

[PATCH] D143399: [Tooling/Inclusion] Move the generated mapping .inc file to private places.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D143399#4110806 , @augusto2112 wrote: > Hi @hokein, this broke the LLDB incremental build > (https://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/50629/console). > How do we fix it? sorry for the breakage. Could you

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495502. hokein added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/ https://reviews.llvm.org/D143214 Files: clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc

[PATCH] D143486: [clangd] Fix a crash in semantic highlighting.

2023-02-07 Thread Haojian Wu 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 rG41a6085252ef: [clangd] Fix a crash in semantic highlighting. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D143486: [clangd] Fix a crash in semantic highlighting.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495496. hokein marked an inline comment as done. hokein added a comment. add a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143486/new/ https://reviews.llvm.org/D143486 Files:

[PATCH] D143054: [include-mapping] Regenerate the mappings from the 20220730 html book.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rG4da283872ad9: [include-mapping] Regenerate the StdSymbolMap.inc from the 20220730 html book. (authored by VitaNuo,

[PATCH] D143280: [include-mapping] Better #includes support for std input/output symbols

2023-02-07 Thread Haojian Wu 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 rG3599cbd3f6db: [include-mapping] Better #includes support for std input/output symbols (authored by hokein). Repository: rG LLVM Github Monorepo

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG1ab62d9d8e96: [Tooling/Inclusion] Support multiple headers in the

[PATCH] D143280: [include-mapping] Better #includes support for std input/output symbols

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495479. hokein added a comment. add a unittest Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143280/new/ https://reviews.llvm.org/D143280 Files: clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495477. hokein added a comment. - Rebase to main, and some small tweaks - unittest will be added when landing the https://reviews.llvm.org/D143280 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142092/new/

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks, it looks mostly good. This needs some work on rebase (as we have landed a few patches that change `StandardLibrary.cpp` file). I will rebase it and land it for you. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D143486: [clangd] Fix a crash in semantic highlighting.

2023-02-07 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. We encounter a few internal

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-07 Thread Haojian Wu 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 rG03f5326d8166: [Tooling/Inclusion] Introduce a human-edit file for C++ std symbols (authored by hokein). Repository: rG LLVM Github Monorepo

[PATCH] D143399: [Tooling/Inclusion] Move the generated mapping .inc file to private places.

2023-02-07 Thread Haojian Wu 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 rGc751264aa198: [Tooling/Inclusion] Move the generated mapping .inc file to private places. (authored by hokein). Changed prior to commit:

[PATCH] D143399: [Tooling/Inclusion] Move the generated mapping .inc file to private places.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. The .inc files are private now, clients should tooling::stdlib APIs instead. Repository: rG LLVM Github Monorepo

[PATCH] D143054: [include-mapping] Regenerate the mappings from the 20220730 html book.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495108. hokein added a comment. merge zoombie names to StdSymboMap.inc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143054/new/ https://reviews.llvm.org/D143054 Files:

[PATCH] D143054: [include-mapping] Regenerate the mappings from the 20220730 html book.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks, it looks good. One remaining suggestion is to merge the `StdRemovedSymbolMap.inc` to the `StdSymbolMap.inc` (it doesn't seem to add much value to maintain a separate file for zoombie symbols), I will address it and land the patch for you. Repository: rG LLVM

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/StdAlternativeHeaderMap.inc:3 +// +// This is a hand-curated list for C++ symbols (e.g. provided by multiple +// headers), to address the short comings of cppreference or automated

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495100. hokein added a comment. Rename the file name for more general purposes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143160/new/ https://reviews.llvm.org/D143160 Files:

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. hokein marked 2 inline comments as done. Closed by commit rG58927e993121: [clangd] Remove the direct use of StdSymbolMapping.inc usage. (authored by hokein). Changed prior to commit:

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495096. hokein marked an inline comment as done. hokein added a comment. refined the comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143274/new/ https://reviews.llvm.org/D143274 Files:

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein marked an inline comment as done. hokein added a comment. In D143274#4106449 , @kadircet wrote: > thanks a lot. since this is the last (and only) upstream user of the raw > mappings. can you also move them into

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495089. hokein marked 3 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/ https://reviews.llvm.org/D143214 Files:

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/StdAlternativeHeaderMap.inc:3 +// +// This is a hand-curated list for C++ symbols (e.g. provided by multiple +// headers), to address the short comings of cppreference or automated

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495066. hokein added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143274/new/ https://reviews.llvm.org/D143274 Files: clang-tools-extra/clangd/index/CanonicalIncludes.cpp

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495065. hokein marked 2 inline comments as done. hokein added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143274/new/ https://reviews.llvm.org/D143274 Files:

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495056. hokein marked 2 inline comments as done. hokein added a comment. address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143214/new/ https://reviews.llvm.org/D143214 Files:

[PATCH] D143280: [include-mapping] Better #includes support for std input/output symbols

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/tools/include-mapping/gen_std.py:160 + headers = [sym_header] + if symbol.name in iosfwd_symbols: +headers.append("") kadircet wrote: > i think putting `iostream` before `iosfwd` in the alternative list makes

[PATCH] D143280: [include-mapping] Better #includes support for std input/output symbols

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495047. hokein marked 2 inline comments as done. hokein added a comment. address review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143280/new/ https://reviews.llvm.org/D143280 Files:

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/index/CanonicalIncludes.cpp:736 void CanonicalIncludes::addSystemHeadersMapping(const LangOptions ) { if (Language.CPlusPlus) { +static const auto *Symbols = []() { kadircet wrote: > what

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495036. hokein marked an inline comment as done. hokein added a comment. address review comment: remove StdSymbolMapping in the CanonicalIncluedes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143274/new/

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/CXXSymbolMap.inc:1 +//===-- CXXSymbolMap.inc *- C++ -*-===// +// kadircet wrote: > also maybe rename this to, `AlternativeHeaderMap.inc` ?

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-06 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 495032. hokein marked an inline comment as done. hokein edited the summary of this revision. hokein added a comment. address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143160/new/

[PATCH] D143280: [include-mapping] Better #includes support for std input/output symbols

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D143280 Files:

[PATCH] D143274: [clangd] Remove the direct use of StdSymbolMapping.inc usage.

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added subscribers: arphaman, mgrang. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. Replace them with the

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG1285172c21ef: [include-mapping] Implement language separation in stdlib recognizer library (authored by VitaNuo, committed by hokein). Changed prior to commit:

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 494611. hokein added a comment. rebase to main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142992/new/ https://reviews.llvm.org/D142992 Files: clang/include/clang/Tooling/Inclusions/StandardLibrary.h

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. Thanks, this looks good to me! This requires some work to rebase for https://github.com/llvm/llvm-project/commit/e1aaa314a46cd303019da117bfd330611d5b7a84, I will rebase it and land it for

[PATCH] D143160: [include-mapping] Introduce a human-edit CXXSymbolMapping file

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 494573. hokein added a comment. refine the patch: include multiple-header symbols. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143160/new/ https://reviews.llvm.org/D143160 Files:

[PATCH] D142467: [Tooling] Add stdlib::Symbol::all() and stdlib::Symbol::qualified_name()

2023-02-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:18 static llvm::StringRef *HeaderNames; +static struct SymbolName { nit: we group

[PATCH] D143214: [include-mapping] Add C-compatibility symbol entries.

2023-02-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a project: All. hokein requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Herald added a project: clang. Extending the python generator: - to generate

[PATCH] D143160: [include-mapping] Extend c-compatibility symbols in StdSymbolMap.inc

2023-02-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 494300. hokein added a comment. upload the missing file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143160/new/ https://reviews.llvm.org/D143160 Files:

[PATCH] D143160: [include-mapping] Extend c-compatibility symbols in StdSymbolMap.inc

2023-02-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 494299. hokein added a comment. update, separate out a new file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143160/new/ https://reviews.llvm.org/D143160 Files:

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:31 + +static llvm::DenseMap LanguageMappings; + VitaNuo wrote: > hokein wrote: > > using a map here seems like an overkill, we have just 2 elements, I'd just > >

[PATCH] D143054: [include-mapping] Regenerate the mappings from the 20220730 html book.

2023-02-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks! The changes in C++ mapping are good in general. Most removals are reasonable, my only concern is the removal of `std::{begin, end, size, empty, data}` (as they are now provided by multiple headers), IMO these are important symbols (no action needed in this

[PATCH] D142992: [include-mapping] Implement language separation in stdlib recognizer library

2023-02-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Can you add some tests in `StandardLibraryTest.cpp`? Comment at: clang/lib/Tooling/Inclusions/Stdlib/StandardLibrary.cpp:31 + +static llvm::DenseMap LanguageMappings; + using a map here seems like an overkill, we have just 2 elements,

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-02-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. As discussed offline, we decided to stop spending effort on improving the cppreference_parser.py, instead, we allow human edits in the generated `StdSymbolMap.inc` and `CSymbolMap.inc`, it gives us more flexibility: sort the headers for multi-header symbol in a

[PATCH] D142967: [clangd] Introduce source.organizeImports code action.

2023-01-31 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: kadircet. Herald added a subscriber: arphaman. Herald added a project: All. hokein requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. Herald added a project: clang-tools-extra. This would provide us a way to

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-01-27 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. I haven't read though all the change of `_ParseSymbolPage`, left some comments. I think we need to update proper tests in `include-mapping/test.py` as we has changed the parser. Comment at: clang/include/clang/Tooling/Inclusions/StdSymbolMap.inc:1162

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-01-24 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang/include/clang/Tooling/Inclusions/StdSymbolMap.inc:106 -SYMBOL(atomic_exchange_explicit, std::, ) -SYMBOL(atomic_fetch_add, std::, ) -SYMBOL(atomic_fetch_add_explicit, std::, ) Looks like the regex filters too many

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-01-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Can you add a unittest in the `StandardLibraryTest.cpp`? Comment at: clang/include/clang/Tooling/Inclusions/StdSymbolMap.inc:1053 SYMBOL(remainder, std::, ) +SYMBOL(remove, std::, ) SYMBOL(remove_all_extents, std::, ) I think

[PATCH] D142125: [clang] Fix the location of UsingTypeLoc.

2023-01-23 Thread Haojian Wu 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 rGebbeb164c25a: [clang] Fix the location of UsingTypeLoc. (authored by hokein). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-01-23 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D142092#4068792 , @VitaNuo wrote: > Added the re-generated symbol maps to this patch as per @hokein's request. Sorry for not being cleared. My suggestion was to generate the maps on the old data (2018-10-28), the reason is

[PATCH] D142092: [include-mapping] Allow multiple headers for the same symbol. Choose the first header of available ones.

2023-01-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. since we modify the python script, could you please update its artifacts (`StdSymbolMap.inc`, `CSymbolMap`) as well? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D142092/new/ https://reviews.llvm.org/D142092

[PATCH] D142187: [clang] Fix typos in member initializers

2023-01-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D142187#4068092 , @ilya-biryukov wrote: > Randomly chiming in here. > I never had a good model of where `CorrectDelayedTyposInExpr`, but wanted to > note that `ActOnFullExpr` also calls it. This may be fine, I just wanted to

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-20 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. oops, sorry for the trouble it caused, and thanks for @kadircet fixing it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140875/new/ https://reviews.llvm.org/D140875 ___

[PATCH] D142125: [clang] Fix the location of UsingTypeLoc.

2023-01-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added a reviewer: sammccall. Herald added subscribers: kadircet, arphaman. Herald added a project: All. hokein requested review of this revision. Herald added projects: clang, clang-tools-extra. It is revealed by the https://reviews.llvm.org/D141280.

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. In D140875#4065763 , @ckandeler wrote: > With this, I now get: > FAILED: bin/clangd-fuzzer > : && /usr/lib/icecream/libexec/icecc/bin/c++ -fPIC > -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time > -Wall

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Haojian Wu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. hokein marked an inline comment as done. Closed by commit rG939dce12f9f3: [clangd] Implement unused include warnings with include-cleaner library. (authored by

[PATCH] D141280: [clang] Build UsingType for elaborated type specifiers.

2023-01-19 Thread Haojian Wu 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 rGe70ca7b35319: [clang] Build UsingType for elaborated type specifiers. (authored by hokein). Changed prior to commit:

[PATCH] D141280: [clang] Build UsingType for elaborated type specifiers.

2023-01-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 490455. hokein added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141280/new/ https://reviews.llvm.org/D141280 Files: clang-tools-extra/include-cleaner/unittests/WalkASTTest.cpp

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ParsedAST.cpp:609 + Config::UnusedIncludesPolicy::Experiment) +Pragmas.record(*Clang); // Copy over the macros in the preamble region of the main file, and combine kadircet wrote: >

[PATCH] D140875: [clangd] prototype: Implement unused include warnings with include-cleaner library.

2023-01-19 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 490452. hokein marked 3 inline comments as done. hokein added a comment. address comments: - rename to computeUnusedIncludesExperimental - use PragmaInclude from preamble, limit the scope of the patch Repository: rG LLVM Github Monorepo CHANGES SINCE

<    1   2   3   4   5   6   7   8   9   10   >