Skip to content

clang-tidy fails to build in the latest code #3011

Closed
@krasznaa

Description

@krasznaa

Hi,

I'm not sure why it would only show up in my build, but I get the following build failure with the current HEAD of the code:

[3321/6558] Building CXX object tools/clang/tools/extra/clang-tidy/altera/CMakeFiles/obj.clangTidyAlteraModule.dir/SingleWorkItemBarrierCheck.cpp.o
FAILED: tools/clang/tools/extra/clang-tidy/altera/CMakeFiles/obj.clangTidyAlteraModule.dir/SingleWorkItemBarrierCheck.cpp.o 
/opt/lcg/gcc/8.3.0-eda0e/x86_64-centos7/bin/g++ -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/tools/extra/clang-tidy/altera -I/root/llvm/clang-tools-extra/clang-tidy/altera -Itools/clang/tools/extra/clang-tidy -I/root/llvm/llvm/../llvm-spirv/include -I/root/llvm/clang/include -Itools/clang/include -Iinclude -I/root/llvm/llvm/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG -std=c++14 -MD -MT tools/clang/tools/extra/clang-tidy/altera/CMakeFiles/obj.clangTidyAlteraModule.dir/SingleWorkItemBarrierCheck.cpp.o -MF tools/clang/tools/extra/clang-tidy/altera/CMakeFiles/obj.clangTidyAlteraModule.dir/SingleWorkItemBarrierCheck.cpp.o.d -o tools/clang/tools/extra/clang-tidy/altera/CMakeFiles/obj.clangTidyAlteraModule.dir/SingleWorkItemBarrierCheck.cpp.o -c /root/llvm/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.cpp
/root/llvm/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.cpp: In member function 'virtual void clang::tidy::altera::SingleWorkItemBarrierCheck::check(const clang::ast_matchers::MatchFinder::MatchResult&)':
/root/llvm/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.cpp:60:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       if (Attribute->getXDim() > 1 || Attribute->getYDim() > 1 ||
                                  ^
/root/llvm/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.cpp:60:62: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
       if (Attribute->getXDim() > 1 || Attribute->getYDim() > 1 ||
                                                              ^
/root/llvm/clang-tools-extra/clang-tidy/altera/SingleWorkItemBarrierCheck.cpp:61:34: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
           Attribute->getZDim() > 1)
                                  ^

(The build is happening inside of a Docker container, that's why the code is under /root...)

As you can see from the output as well, the build is done using GCC 8.3.0, on CentOS 7. But I doubt that the OS makes much of a difference for this.

I see that this code was added in: e69e551 But I don't know why the CI (or any developer's build for that matter) would not fail on it... 😕

Cheers,
Attila

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions