Repository navigation
[flang-rt] Fix -Wunused-template in time intrinsics and test helpers (NFC) - #207979
Merged
Merged
Conversation
…(NFC) time-intrinsic.cpp implements the timing intrinsics as SFINAE overload sets (preferred/fallback per platform), so on any given platform some overloads are intentionally never instantiated and trip -Wunused-template. Mark all variants [[maybe_unused]]. StoreElement and MakeArray in unittests/Runtime/tools.h are static function templates in a header, so any test TU that includes it without using all of them trips the warning. Drop static. Part of llvm#202945.
Member
Author
|
cc @clementval @khaki3 @vgvassilev @erichkeane |
clementval
approved these changes
Jul 7, 2026
vgvassilev
pushed a commit
that referenced
this pull request
Jul 8, 2026
Reland of #206123, which was reverted in #207848. What has changed since: - flang-rt occurrences are fixed in #207979 - openmp had one more occurrence which is fixed in #207983 - The remaining -Wunused-template hits anywhere in CI logs are the tsan Go runtime warnings, which are warnings only (buildgo.sh does not use -Werror on Linux) Marked as draft until #207979 and #207983 land. Closes #202945
gandhi56
pushed a commit
that referenced
this pull request
Jul 9, 2026
…(NFC) (#207979) `time-intrinsic.cpp` implements the timing intrinsics as SFINAE overload sets (preferred/fallback per platform), so on any given platform some overloads are intentionally never instantiated and trip -Wunused-template. Mark all variants [[maybe_unused]]. `StoreElement` and `MakeArray` in `unittests/Runtime/tools.h` are static function templates in a header, so any test TU that includes it without using all of them trips the warning. Part of #202945
gandhi56
pushed a commit
that referenced
this pull request
Jul 9, 2026
Reland of #206123, which was reverted in #207848. What has changed since: - flang-rt occurrences are fixed in #207979 - openmp had one more occurrence which is fixed in #207983 - The remaining -Wunused-template hits anywhere in CI logs are the tsan Go runtime warnings, which are warnings only (buildgo.sh does not use -Werror on Linux) Marked as draft until #207979 and #207983 land. Closes #202945
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
time-intrinsic.cppimplements the timing intrinsics as SFINAE overload sets (preferred/fallback per platform), so on any given platform some overloads are intentionally never instantiated and trip -Wunused-template. Mark all variants [[maybe_unused]].StoreElementandMakeArrayinunittests/Runtime/tools.hare static function templates in a header, so any test TU that includes it without using all of them trips the warning.Part of #202945