pingcap / tiflash

The analytical engine for TiDB and TiDB Cloud. Try free: https://tidbcloud.com/free-trial
https://docs.pingcap.com/tidb/stable/tiflash-overview
Apache License 2.0
936 stars 409 forks source link

clang-tidy reports: unknown pragma ignored #9165

Closed JinheLin closed 1 week ago

JinheLin commented 1 week ago

/home/jenkins/agent/workspace/tiflash-build-common/tiflash/dbms/src/Common/TargetSpecific.h:559:1: error: unknown pragma ignored [clang-diagnostic-unknown-pragmas]

  559 | TIFLASH_TARGET_SPECIFIC_NAMESPACE(template <size_t LENGTH> struct Word {

      | ^

/home/jenkins/agent/workspace/tiflash-build-common/tiflash/dbms/src/Common/TargetSpecific.h:535:5: note: expanded from macro 'TIFLASH_TARGET_SPECIFIC_NAMESPACE'

  535 |     TIFLASH_AVX_NAMESPACE(__VA_ARGS__)         \

      |     ^

/home/jenkins/agent/workspace/tiflash-build-common/tiflash/dbms/src/Common/TargetSpecific.h:494:5: note: expanded from macro 'TIFLASH_AVX_NAMESPACE'

  494 |     TIFLASH_BEGIN_AVX_SPECIFIC_CODE           \

      |     ^

/home/jenkins/agent/workspace/tiflash-build-common/tiflash/dbms/src/Common/TargetSpecific.h:54:9: note: expanded from macro 'TIFLASH_BEGIN_AVX_SPECIFIC_CODE'

   54 |         _Pragma("clang attribute push(__attribute__((target(\"sse,sse2,sse3,ssse3,sse4,popcnt,avx,avx2\"))),apply_to=function)")

      |         ^

note: expanded from here
JinheLin commented 1 week ago

This is a bug in LLVM 17 when compiling for C++20. Should be fixed in 18. See https://github.com/llvm/llvm-project/issues/67380.

ref https://github.com/pingcap/tiflash/issues/7193