llvm-diff doesn't return non-zero exit code when functions exist in one module but not another
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
From the discussion in https://github.com/llvm/llvm-project/pull/211425#discussion_r3635155023_
llvm-diff will return a non-zero exit code if both modules have the same functions and the function contents themselves differ. However if the function doesn't exist in one of the modules it will return exit code 0, and just log "function %l exists only in left module" to stderr.
It should probably also return a non-zero exit code in this case so it only returns 0 when the two modules are the same.
Contributor guide
Research direction
Start by tracing llvm-diff's exit-status handling for the diagnostic that a function exists only in the left module, then compare it with the path used when function contents differ. Reproduce the case with two modules where one function is missing and verify that missing functions produce a non-zero exit code while identical modules still return 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100