Skip to content
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

Clang tidy failed. #121153

Open
RandUser123sa opened this issue Dec 26, 2024 · 5 comments
Open

Clang tidy failed. #121153

RandUser123sa opened this issue Dec 26, 2024 · 5 comments
Labels
clang-tidy crash Prefer [crash-on-valid] or [crash-on-invalid] needs-reduction Large reproducer that should be reduced into a simpler form

Comments

@RandUser123sa
Copy link

Hello,

I'm trying to compile AMDMIGraphX_rocm_6_3_1 from source and I receive the error and attach it.

clang-tidy: /mnt/arch/rocm/release/llvm-project-rocm-6.3.1/clang/lib/AST/ExprConstant.cpp:15679: bool clang::Expr::EvaluateAsInt(EvalResult&, const clang::ASTContext&, SideEffectsKind, bool) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.

clangerror.txt

@github-actions github-actions bot added the clang Clang issues not falling into any other category label Dec 26, 2024
@asl
Copy link
Collaborator

asl commented Dec 26, 2024

Consider reporting the issue to downstream repo or provide a reproduction with mainline clang

@asl asl added the incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) label Dec 26, 2024
@EugeneZelenko EugeneZelenko added clang-tidy crash Prefer [crash-on-valid] or [crash-on-invalid] needs-reduction Large reproducer that should be reduced into a simpler form and removed clang Clang issues not falling into any other category incomplete Issue not complete (e.g. missing a reproducer, build arguments, etc.) labels Dec 26, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 26, 2024

@llvm/issue-subscribers-clang-tidy

Author: None (RandUser123sa)

Hello,

I'm trying to compile AMDMIGraphX_rocm_6_3_1 from source and I receive the error and attach it.

clang-tidy: /mnt/arch/rocm/release/llvm-project-rocm-6.3.1/clang/lib/AST/ExprConstant.cpp:15679: bool clang::Expr::EvaluateAsInt(EvalResult&, const clang::ASTContext&, SideEffectsKind, bool) const: Assertion `!isValueDependent() && "Expression evaluator can't be called on a dependent expression."' failed.

clangerror.txt

@EugeneZelenko
Copy link
Contributor

Which Clang-tidy version do you use?

@JonasToth
Copy link
Member

JonasToth commented Dec 26, 2024

1. <eof> parser at end of file 2. ASTMatcher: Processing
 'bugprone-not-null-terminated-result' against: 

CallExpr : </usr/include/google/protobuf/message_lite.h:1245:7, col:50> 
--- Bound Nodes Begin --- 
DestExpr - { DeclRefExpr : </usr/include/google/protobuf/message_lite.h:1245:14> } 
DestVarDecl - { VarDecl dst : </usr/include/google/protobuf/message_lite.h:1207:3, col:37> } 
FunctionExpr - { CallExpr : </usr/include/google/protobuf/message_lite.h:1245:7, col:50> } 
LengthExpr - { IntegerLiteral : </usr/include/google/protobuf/message_lite.h:1245:48> }
SrcExpr - { DeclRefExpr : </usr/include/google/protobuf/message_lite.h:1245:31> } 
SrcVarDecl - { VarDecl src : </usr/include/google/protobuf/message_lite.h:1209:3, col:69> } 
UnknownDest - { DeclRefExpr : </usr/include/google/protobuf/message_lite.h:1245:14> } 
WrongLength - { IntegerLiteral : </usr/include/google/protobuf/message_lite.h:1245:48> } 
--- Bound Nodes End ---

Do you know which version of protobuf is installed on your system?
It is important to reproduce the bug.

Can you please preprocess the following file:
/mnt/arch/rocm/release/AMDMIGraphX-rocm-6.3.1/src/tf/parse_gather.cpp
This is done using the '-E' option instead of '-c'. You can check the 'compile_commands.json' that are hopefully generated in your build.
https://clang.llvm.org/docs/ClangCommandLineReference.html#actions

Duplicate of #120792

@RandUser123sa
Copy link
Author

Hi @JonasToth

my protobuf is version 29.2

no, it's not working. I change the build params to use -E instead of -c, here is it:

/opt/rocm/llvm/bin/amdclang -DMIGRAPHX_CXX_COMPILER="/opt/rocm/llvm/bin/amdclang" -DMIGRAPHX_HAS_EXECUTORS=0 -DMSGPACK_DEFAULT_API_VERSION=3 -Dmigraphx_tf_EXPORTS -I/mnt/arch/rocm/rocm-build/build/amdmigraphx/src/tf/include -I/mnt/arch/rocm/release/AMDMIGraphX-rocm-6.3.1/src/tf/include -I/mnt/arch/rocm/rocm-build/build/amdmigraphx/src/include -I/mnt/arch/rocm/release/AMDMIGraphX-rocm-6.3.1/src/include -isystem /mnt/arch/rocm/rocm-build/build/amdmigraphx/src/tf -isystem /opt/rocm/include -O3 -DNDEBUG -fPIC -std=c++17 -Wall -Wextra -Wcomment -Wendif-labels -Wformat -Winit-self -Wreturn-type -Wsequence-point -Wswitch -Wtrigraphs -Wundef -Wuninitialized -Wunreachable-code -Wunused -Wno-sign-compare -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic -Wno-conversion -Wno-double-promotion -Wno-exit-time-destructors -Wno-extra-semi -Wno-extra-semi-stmt -Wno-float-conversion -Wno-gnu-anonymous-struct -Wno-gnu-zero-variadic-macro-arguments -Wno-missing-prototypes -Wno-nested-anon-types -Wno-option-ignored -Wno-padded -Wno-shorten-64-to-32 -Wno-sign-conversion -Wno-unused-command-line-argument -Wno-weak-vtables -Wno-c99-extensions -Wno-unsafe-buffer-usage -o CMakeFiles/migraphx_tf.dir/op_parser.cpp.o -E /mnt/arch/rocm/release/AMDMIGraphX-rocm-6.3.1/src/tf/op_parser.cpp

this line is finished without error and then I re-run the compilation but I get the same error. I attach the file with compilation command and error because is too big for paste here.

clangerr.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy crash Prefer [crash-on-valid] or [crash-on-invalid] needs-reduction Large reproducer that should be reduced into a simpler form
Projects
None yet
Development

No branches or pull requests

5 participants