Skip to content

suppress spurious clang-tidy warnings in debug macros#914

Merged
rapids-bot[bot] merged 1 commit intorapidsai:branch-21.12from
rongou:clang-tidy-macros
Nov 10, 2021
Merged

suppress spurious clang-tidy warnings in debug macros#914
rapids-bot[bot] merged 1 commit intorapidsai:branch-21.12from
rongou:clang-tidy-macros

Conversation

@rongou
Copy link
Contributor

@rongou rongou commented Nov 10, 2021

Getting these clang-tidy warnings in debug build:

/home/rou/src/rmm/include/rmm/cuda_stream.hpp:86:5: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
    RMM_LOGGING_ASSERT(is_valid());
    ^
/home/rou/src/rmm/include/rmm/detail/error.hpp:260:7: note: expanded from macro 'RMM_LOGGING_ASSERT'
      assert(success);                                                                            \
      ^
/usr/include/assert.h:95:51: note: expanded from macro 'assert'
      : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
                                                  ^
/usr/include/assert.h:129:30: note: expanded from macro '__ASSERT_FUNCTION'
#   define __ASSERT_FUNCTION    __extension__ __PRETTY_FUNCTION__
                                ^

Looks to be a pending issue with clang-tidy: https://reviews.llvm.org/D88833

@rongou rongou added 3 - Ready for review Ready for review by team non-breaking Non-breaking change improvement Improvement / enhancement to an existing function cpp Pertains to C++ code labels Nov 10, 2021
@rongou rongou requested review from harrism and jrhemstad November 10, 2021 18:55
@rongou rongou requested a review from a team as a code owner November 10, 2021 18:55
@rongou rongou self-assigned this Nov 10, 2021
@harrism
Copy link
Member

harrism commented Nov 10, 2021

@gpucibot merge

@rapids-bot rapids-bot bot merged commit bbfb011 into rapidsai:branch-21.12 Nov 10, 2021
@rongou rongou deleted the clang-tidy-macros branch November 23, 2021 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3 - Ready for review Ready for review by team cpp Pertains to C++ code improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants