Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tooling/Inclusion] Add binary search related std::ranges symbols to the mapping. #113796

Merged
merged 7 commits into from
Oct 30, 2024

Conversation

c8ef
Copy link
Contributor

@c8ef c8ef commented Oct 27, 2024

Fixes #94459.

@c8ef c8ef changed the title Draft [Tooling/Inclusion] Add binary search related std::range symbols to the mapping. Oct 27, 2024
@c8ef c8ef marked this pull request as ready for review October 27, 2024 06:46
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Oct 27, 2024
@c8ef c8ef requested review from kadircet and hokein October 27, 2024 06:46
@llvmbot
Copy link
Member

llvmbot commented Oct 27, 2024

@llvm/pr-subscribers-clang

Author: None (c8ef)

Changes

Fixes #94459.


Full diff: https://github.com/llvm/llvm-project/pull/113796.diff

1 Files Affected:

  • (modified) clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc (+4)
diff --git a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
index b46bd2e4d7a4b5..48d1afc378d54f 100644
--- a/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
+++ b/clang/lib/Tooling/Inclusions/Stdlib/StdSymbolMap.inc
@@ -3547,6 +3547,7 @@ SYMBOL(as_rvalue_view, std::ranges::, <ranges>)
 SYMBOL(basic_istream_view, std::ranges::, <ranges>)
 SYMBOL(begin, std::ranges::, <ranges>)
 SYMBOL(bidirectional_range, std::ranges::, <ranges>)
+SYMBOL(binary_search, std::ranges::, <algorithm>)
 SYMBOL(binary_transform_result, std::ranges::, <algorithm>)
 SYMBOL(borrowed_iterator_t, std::ranges::, <ranges>)
 SYMBOL(borrowed_range, std::ranges::, <ranges>)
@@ -3592,6 +3593,7 @@ SYMBOL(enable_view, std::ranges::, <ranges>)
 SYMBOL(end, std::ranges::, <ranges>)
 SYMBOL(ends_with, std::ranges::, <algorithm>)
 SYMBOL(equal, std::ranges::, <algorithm>)
+SYMBOL(equal_range, std::ranges::, <algorithm>)
 SYMBOL(equal_to, std::ranges::, <functional>)
 SYMBOL(fill, std::ranges::, <algorithm>)
 SYMBOL(fill_n, std::ranges::, <algorithm>)
@@ -3643,6 +3645,7 @@ SYMBOL(lazy_split_view, std::ranges::, <ranges>)
 SYMBOL(less, std::ranges::, <functional>)
 SYMBOL(less_equal, std::ranges::, <functional>)
 SYMBOL(lexicographical_compare, std::ranges::, <algorithm>)
+SYMBOL(lower_bound, std::ranges::, <algorithm>)
 SYMBOL(make_heap, std::ranges::, <algorithm>)
 SYMBOL(max, std::ranges::, <algorithm>)
 SYMBOL(max_element, std::ranges::, <algorithm>)
@@ -3765,6 +3768,7 @@ SYMBOL(uninitialized_value_construct_n, std::ranges::, <memory>)
 SYMBOL(unique, std::ranges::, <algorithm>)
 SYMBOL(unique_copy, std::ranges::, <algorithm>)
 SYMBOL(unique_copy_result, std::ranges::, <algorithm>)
+SYMBOL(upper_bound, std::ranges::, <algorithm>)
 SYMBOL(values_view, std::ranges::, <ranges>)
 SYMBOL(view, std::ranges::, <ranges>)
 SYMBOL(view_base, std::ranges::, <ranges>)

@c8ef c8ef changed the title [Tooling/Inclusion] Add binary search related std::range symbols to the mapping. [Tooling/Inclusion] Add binary search related std::ranges symbols to the mapping. Oct 27, 2024
@c8ef
Copy link
Contributor Author

c8ef commented Oct 28, 2024

Friendly ping~ @kadircet @hokein

@kadircet
Copy link
Member

can you move these changes into clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc? that's the hand-curated version, we try to autogenerate the other one by parsing cppreference.

@c8ef
Copy link
Contributor Author

c8ef commented Oct 29, 2024

can you move these changes into clang/lib/Tooling/Inclusions/Stdlib/StdSpecialSymbolMap.inc? that's the hand-curated version, we try to autogenerate the other one by parsing cppreference.

Done. Please take another look.

Copy link
Member

@kadircet kadircet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, lgtm!

let me know if i should land this for you

@@ -411,6 +411,11 @@ SYMBOL(_27, std::placeholders::, <functional>)
SYMBOL(_28, std::placeholders::, <functional>)
SYMBOL(_29, std::placeholders::, <functional>)

SYMBOL(binary_search, std::ranges::, <algorithm>)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you move this next to

// Symbols missing from the generated symbol map as reported by users.
// Remove when the generator starts producing them.
SYMBOL(make_any, std::, <any>)
SYMBOL(any_cast, std::, <any>)
SYMBOL(div, std::, <cstdlib>)
SYMBOL(abort, std::, <cstdlib>)
?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@c8ef
Copy link
Contributor Author

c8ef commented Oct 30, 2024

Thanks for your review!

@c8ef c8ef merged commit 68daf7d into llvm:main Oct 30, 2024
8 checks passed
@c8ef c8ef deleted the tidy branch October 30, 2024 14:04
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 30, 2024

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building clang at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/9362

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: functionalities/breakpoint/breakpoint_conditions/TestBreakpointConditions.py (33 of 2698)
PASS: lldb-api :: commands/gui/basic/TestGuiBasic.py (34 of 2698)
PASS: lldb-api :: commands/watchpoints/watchpoint_set_command/TestWatchLocationWithWatchSet.py (35 of 2698)
PASS: lldb-api :: functionalities/load_unload/TestLoadUnload.py (36 of 2698)
PASS: lldb-api :: commands/gui/viewlarge/TestGuiViewLarge.py (37 of 2698)
PASS: lldb-api :: tools/lldb-server/TestGdbRemoteCompletion.py (38 of 2698)
PASS: lldb-api :: lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py (39 of 2698)
PASS: lldb-api :: commands/frame/recognizer/TestFrameRecognizer.py (40 of 2698)
PASS: lldb-api :: types/TestIntegerTypeExpr.py (41 of 2698)
PASS: lldb-api :: functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py (42 of 2698)
FAIL: lldb-api :: tools/lldb-dap/launch/TestDAP_launch.py (43 of 2698)
******************** TEST 'lldb-api :: tools/lldb-dap/launch/TestDAP_launch.py' FAILED ********************
Script:
--
/usr/bin/python3 /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./lib --env LLVM_INCLUDE_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/include --env LLVM_TOOLS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./bin --arch x86_64 --build-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex --lldb-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/lldb --compiler /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/clang --dsymutil /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/dsymutil --make /usr/bin/make --llvm-tools-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./bin --lldb-obj-root /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb --lldb-libs-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./lib -t /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/tools/lldb-dap/launch -p TestDAP_launch.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 20.0.0git (https://github.com/llvm/llvm-project.git revision 68daf7d27ecc085fe7347552736197db6453f71c)
  clang revision 68daf7d27ecc085fe7347552736197db6453f71c
  llvm revision 68daf7d27ecc085fe7347552736197db6453f71c
Skipping the following test categories: ['libc++', 'dsym', 'gmodules', 'debugserver', 'objc']
========= DEBUG ADAPTER PROTOCOL LOGS =========
1730297241.437439203 --> 
Content-Length: 344

{
  "arguments": {
    "adapterID": "lldb-native",
    "clientID": "vscode",
    "columnsStartAt1": true,
    "linesStartAt1": true,
    "locale": "en-us",
    "pathFormat": "path",
    "sourceInitFile": false,
    "supportsRunInTerminalRequest": true,
    "supportsStartDebuggingRequest": true,
    "supportsVariablePaging": true,
    "supportsVariableType": true
  },
  "command": "initialize",
  "seq": 1,
  "type": "request"
}
1730297241.439302206 <-- 
Content-Length: 1589


NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
…o the mapping. (llvm#113796)

Fixes llvm#94459.

This patch adds binary search related `std::ranges` symbols to the mapping.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[clang-tidy] misc-include-cleaner suggests the wrong header for std::ranges::upper_bound
4 participants