Skip to content

[clang-tidy] Adjust size-empty doc because C++11 size() is constant-time #117629

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

Conversation

N-Dekker
Copy link
Contributor

From C++11, a conforming size() method is guaranteed to be a constant-time function. empty() is not generally more efficient than size(). It might even be implemented in terms of size().


Notes:

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot
Copy link
Member

llvmbot commented Nov 25, 2024

@llvm/pr-subscribers-clang-tidy

@llvm/pr-subscribers-clang-tools-extra

Author: Niels Dekker (N-Dekker)

Changes

From C++11, a conforming size() method is guaranteed to be a constant-time function. empty() is not generally more efficient than size(). It might even be implemented in terms of size().


Notes:


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

1 Files Affected:

  • (modified) clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h (+4-6)
diff --git a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
index 617dadce76bd3e..acd8a6bfc50f5e 100644
--- a/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
+++ b/clang-tools-extra/clang-tidy/readability/ContainerSizeEmptyCheck.h
@@ -18,12 +18,10 @@ namespace clang::tidy::readability {
 /// a call to `empty()`.
 ///
 /// The emptiness of a container should be checked using the `empty()` method
-/// instead of the `size()` method. It is not guaranteed that `size()` is a
-/// constant-time function, and it is generally more efficient and also shows
-/// clearer intent to use `empty()`. Furthermore some containers may implement
-/// the `empty()` method but not implement the `size()` method. Using `empty()`
-/// whenever possible makes it easier to switch to another container in the
-/// future.
+/// instead of the `size()` method. It shows clearer intent to use `empty()`.
+/// Furthermore some containers may implement the `empty()` method but not
+/// implement the `size()` method. Using `empty()` whenever possible makes it
+/// easier to switch to another container in the future.
 class ContainerSizeEmptyCheck : public ClangTidyCheck {
 public:
   ContainerSizeEmptyCheck(StringRef Name, ClangTidyContext *Context);

@N-Dekker
Copy link
Contributor Author

A personal note: yes, I like clang-tidy's readibility-container-size-empty check, I think it's great! And I do very much prefer empty() over size() "whenever possible". It's just that I think the claims in the documentation about efficiency and time complexity are no longer valid.

@PiotrZSL
Copy link
Member

You understand that this check does not apply only to std:: containers but also to boost and other custom one that have size and empty methods. In such case claim is still valid. If you change check description, then check documentation also should be updated to be in sync.

@N-Dekker
Copy link
Contributor Author

You understand that this check does not apply only to std:: containers but also to boost and other custom one that have size and empty methods. In such case claim is still valid.

Thanks for your prompt reply, Piotr. I thought of custom containers too, but then again, I would rather not make any claim about the efficiency of size() and empty() methods of arbitrary custom containers. I mean, they could do anything!

In order for the documentation to make claims about size() versus empty(), I think they should behave like those of std:: containers, including their time complexity. Otherwise it's hard to reason about them in a general way.

But then, do you happen to know whether there are indeed still Boost containers that have a size() method which has a greater-than-constant time complexity? If so, can you possibly name one?

If you change check description, then check documentation also should be updated to be in sync.

Thanks! So this pull request should make some more adjustments before it can be merged (if it would be accepted at all)?

Copy link
Contributor

@HerrCai0907 HerrCai0907 left a comment

Choose a reason for hiding this comment

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

Please update clang-tools-extra/docs/clang-tidy/checks/readability/container-size-empty.rst also.

@HerrCai0907
Copy link
Contributor

In such case claim is still valid

I think we should remove the discussion about efficient in claim since it is misleading after C++11. For self-defined container, because implement of empty and size can be totally different, this claim is still misleading.

From C++11, a conforming `size()` method is guaranteed to be a constant-time function. `empty()` is not _generally_ more efficient than `size()`. It might even be implemented in terms of `size()`.
@N-Dekker N-Dekker force-pushed the clang-tidy-ContainerSizeEmptyCheck-constant-time-size branch from 87688f9 to ab3009e Compare November 26, 2024 07:40
@N-Dekker
Copy link
Contributor Author

Thanks for your encouragement, @HerrCai0907. I just force-pushed, as you suggested.

To further clarify my motivation, I believe that C++ users actually got the impression from the documentation that this check will make their code faster. ITK pull request InsightSoftwareConsortium/ITK#4985 ("PERF: readability container size empty") was also labeled as a performance improvement, while I think it is very unlikely to have any effect on the run-time performance.

Copy link
Member

@PiotrZSL PiotrZSL left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@HerrCai0907 HerrCai0907 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@N-Dekker
Copy link
Contributor Author

N-Dekker commented Dec 2, 2024

@PiotrZSL @HerrCai0907 Thank you both for your feedback and approval! Would one of you be able the merge the pull request?

@HerrCai0907 HerrCai0907 merged commit da5f330 into llvm:main Dec 2, 2024
9 checks passed
Copy link

github-actions bot commented Dec 2, 2024

@N-Dekker Congratulations on having your first Pull Request (PR) merged into the LLVM Project!

Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR.

Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues.

How to do this, and the rest of the post-merge process, is covered in detail here.

If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again.

If you don't get any reports, no action is required from you. Your changes are working as expected, well done!

@llvm-ci
Copy link
Collaborator

llvm-ci commented Dec 3, 2024

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve-vla running on linaro-g3-03 while building clang-tools-extra at step 6 "build stage 1".

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

Here is the relevant piece of the build log for the reference
Step 6 (build stage 1) failure: 'ninja' (failure)
...
[3512/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/canonicalize-directives.cpp.o
[3513/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/canonicalize-do.cpp.o
[3514/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/canonicalize-acc.cpp.o
[3515/3925] Linking CXX static library lib/libclangDependencyScanning.a
[3516/3925] Linking CXX static library lib/liblldWasm.a
[3517/3925] Linking CXX static library lib/libclangHandleCXX.a
[3518/3925] Building CXX object tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/program-parsers.cpp.o
[3519/3925] Building CXX object tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/openacc-parsers.cpp.o
[3520/3925] Building CXX object tools/flang/lib/Parser/CMakeFiles/FortranParser.dir/openmp-parsers.cpp.o
[3521/3925] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/ConvertExprToHLFIR.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/ConvertExprToHLFIR.cpp.o 
/usr/local/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/clang/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../clang/include -mcpu=neoverse-512tvb -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/ConvertExprToHLFIR.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/ConvertExprToHLFIR.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/ConvertExprToHLFIR.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower/ConvertExprToHLFIR.cpp
[3522/3925] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Decomposer.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Decomposer.cpp.o 
/usr/local/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/clang/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../clang/include -mcpu=neoverse-512tvb -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Decomposer.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Decomposer.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/Decomposer.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower/OpenMP/Decomposer.cpp
[3523/3925] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/HostAssociations.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/HostAssociations.cpp.o 
/usr/local/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/clang/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../clang/include -mcpu=neoverse-512tvb -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/HostAssociations.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/HostAssociations.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/HostAssociations.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower/HostAssociations.cpp
[3524/3925] Linking CXX executable bin/clang-fuzzer-dictionary
[3525/3925] Linking CXX static library lib/liblldCOFF.a
[3526/3925] Linking CXX static library lib/liblldMachO.a
[3527/3925] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/PFTBuilder.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/PFTBuilder.cpp.o 
/usr/local/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/clang/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../clang/include -mcpu=neoverse-512tvb -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/PFTBuilder.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/PFTBuilder.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/PFTBuilder.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower/PFTBuilder.cpp
[3528/3925] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/DataSharingProcessor.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/DataSharingProcessor.cpp.o 
/usr/local/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/clang/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../clang/include -mcpu=neoverse-512tvb -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/DataSharingProcessor.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/DataSharingProcessor.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/OpenMP/DataSharingProcessor.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower/OpenMP/DataSharingProcessor.cpp
[3529/3925] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/IterationSpace.cpp.o
FAILED: tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/IterationSpace.cpp.o 
/usr/local/bin/c++ -DFLANG_INCLUDE_TESTS=1 -DFLANG_LITTLE_ENDIAN=1 -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/flang/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/include -I/home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/mlir/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/tools/clang/include -isystem /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/llvm/../clang/include -mcpu=neoverse-512tvb -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-copy -Wno-string-conversion -Wno-ctad-maybe-unsupported -Wno-unused-command-line-argument -Wstring-conversion           -Wcovered-switch-default -Wno-nested-anon-types -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/IterationSpace.cpp.o -MF tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/IterationSpace.cpp.o.d -o tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/IterationSpace.cpp.o -c /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/flang/lib/Lower/IterationSpace.cpp
[3530/3925] Linking CXX static library lib/liblldELF.a
[3531/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/check-purity.cpp.o
[3532/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/check-namelist.cpp.o
[3533/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/program-tree.cpp.o
[3534/3925] Building CXX object tools/flang/lib/Lower/CMakeFiles/FortranLower.dir/ConvertType.cpp.o
[3535/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/check-stop.cpp.o
[3536/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/check-arithmeticif.cpp.o
[3537/3925] Building CXX object tools/flang/lib/Semantics/CMakeFiles/FortranSemantics.dir/openmp-modifiers.cpp.o
[3538/3925] Linking CXX executable bin/clang-offload-packager
[3539/3925] Linking CXX executable bin/llvm-ar
[3540/3925] Linking CXX executable bin/clang-linker-wrapper
[3541/3925] Linking CXX executable bin/clang-nvlink-wrapper
[3542/3925] Linking CXX shared library lib/libLTO.so.20.0git
[3543/3925] Linking CXX executable bin/mlir-translate
[3544/3925] Linking CXX executable bin/mlir-query
[3545/3925] Linking CXX executable bin/mlir-rewrite
[3546/3925] Linking CXX executable bin/mlir-cpu-runner
[3547/3925] Linking CXX executable bin/mlir-lsp-server
[3548/3925] Linking CXX executable bin/mlir-reduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants