-
Notifications
You must be signed in to change notification settings - Fork 13.5k
There is no output when I use command clang -cc1 -analyze -analyzer-checker=debug.ViewExplodedGraph test.c
to dump the ExplodedGraph of test.c
#53873
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
Comments
These two lines are wrapped with macro |
Thank you, may I ask where could I enable this assertion? |
You need to re-compile your clang to enable this. |
Proposed fix: https://reviews.llvm.org/D124442 |
Historically, exploded graph dumps were disabled in non-debug builds. It was done so probably because a regular user should not dump the internal representation of the analyzer anyway and the dump methods might introduce unnecessary binary size overhead. It turns out some of the users actually want to dump this. Note that e.g. `LiveExpressionsDumper`, `LiveVariablesDumper`, `ControlDependencyTreeDumper` etc. worked previously, and they are unaffected by this change. However, `CFGViewer` and `CFGDumper` still won't work for a similar reason. AFAIK only these two won't work after this change. Addresses #53873 --- **baseline** | binary | size | size after strip | | clang | 103M | 83M | | clang-tidy | 67M | 54M | **after this change** | binary | size | size after strip | | clang | 103M | 84M | | clang-tidy | 67M | 54M | CMake configuration: ``` cmake -S llvm -GNinja -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_USE_LINKER=lld -DLLVM_ENABLE_DUMP=OFF -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_Z3_SOLVER=ON -DLLVM_TARGETS_TO_BUILD="X86" ``` Built by `clang-14.0.0`. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D124442
Please tell me how to solve the following problem when I recompile: |
I don't understand your problem. Could you please provide more details? |
OK, THANKS. |
Okay, it seems like something really messed up. What version (commit hash) of PS: I was really confused since you mentioned that you got some error during build time, but it seems like cmake configure failed. |
Thank you for your answer. |
I would recommend using the monorepo version where |
ok, i'll rebuild in monorepo version. Thanks:) |
Historically, exploded graph dumps were disabled in non-debug builds. It was done so probably because a regular user should not dump the internal representation of the analyzer anyway and the dump methods might introduce unnecessary binary size overhead. It turns out some of the users actually want to dump this. Note that e.g. `LiveExpressionsDumper`, `LiveVariablesDumper`, `ControlDependencyTreeDumper` etc. worked previously, and they are unaffected by this change. However, `CFGViewer` and `CFGDumper` still won't work for a similar reason. AFAIK only these two won't work after this change. Addresses llvm#53873 --- **baseline** | binary | size | size after strip | | clang | 103M | 83M | | clang-tidy | 67M | 54M | **after this change** | binary | size | size after strip | | clang | 103M | 84M | | clang-tidy | 67M | 54M | CMake configuration: ``` cmake -S llvm -GNinja -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_USE_LINKER=lld -DLLVM_ENABLE_DUMP=OFF -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" -DLLVM_ENABLE_Z3_SOLVER=ON -DLLVM_TARGETS_TO_BUILD="X86" ``` Built by `clang-14.0.0`. Reviewed By: martong Differential Revision: https://reviews.llvm.org/D124442 (cherry picked from commit 5ce7050)
When I use this command, shell output is
Warning: viewing graph requires assertions
, What does that means? And there is no any.dot
file output. What should I do to view the ExplodedGraph of test.c.The LLVM version I use is 12.0.0,I directly downloaded the released package instead of compiling from source code, the graphviz version I use is 2.40.1.
The text was updated successfully, but these errors were encountered: