Skip to content

How to run clang analyzer with emscripten? #24365

Closed
@ravisumit33

Description

@ravisumit33

Recently I am trying to run clang analyzer with emscripten. It provides scan-build which wraps the command and analyze. But that doesn't work with emcc. I tried to explore what it does internally and found that it invokes clang with --analyze. I tried passing it manually with emcc only to get below error:

clang++: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
error: action RunAnalysis not compiled in
make[2]: *** [CMakeFiles/hello_world.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/hello_world.dir/all] Error 2
make: *** [all] Error 2

Is there a way to run static analyzer on cpp code written for Emscripten?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions