Skip to content

Commit

Permalink
cswrap-core: new parameter analyzer_is_cxx_ready
Browse files Browse the repository at this point in the history
  • Loading branch information
kdudka committed Jul 20, 2018
1 parent df8c3b6 commit 8331330
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions csclng.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ const char *wrapper_debug_envvar_name = "DEBUG_CSCLNG";

const char *analyzer_name = "clang";

const bool analyzer_is_cxx_ready = true;

const bool analyzer_is_gcc_compatible = true;

static const char *analyzer_def_arg_list[] = {
Expand Down
2 changes: 2 additions & 0 deletions cscppc.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const char *wrapper_debug_envvar_name = "DEBUG_CSCPPC";

const char *analyzer_name = "cppcheck";

const bool analyzer_is_cxx_ready = true;

const bool analyzer_is_gcc_compatible = false;

static const char *analyzer_def_arg_list[] = {
Expand Down
9 changes: 7 additions & 2 deletions cswrap-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,13 @@ bool is_bare_def_inc(const char *arg)

bool is_input_file_suffix(const char *suffix)
{
return STREQ(suffix, "c")
|| STREQ(suffix, "C")
if (STREQ(suffix, "c"))
return true;

if (!analyzer_is_cxx_ready)
return false;

return STREQ(suffix, "C")
|| STREQ(suffix, "cc")
|| STREQ(suffix, "cpp")
|| STREQ(suffix, "cxx");
Expand Down
2 changes: 2 additions & 0 deletions cswrap-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ extern const char *wrapper_debug_envvar_name;

extern const char *analyzer_name;

extern const bool analyzer_is_cxx_ready;

extern const bool analyzer_is_gcc_compatible;

extern const char **analyzer_def_argv;
Expand Down

0 comments on commit 8331330

Please sign in to comment.