Skip to content

Pass defines flags when calling clang#2651

Merged
danmar merged 2 commits into
cppcheck-opensource:masterfrom
Ken-Patrick:clang_defines
May 20, 2020
Merged

Pass defines flags when calling clang#2651
danmar merged 2 commits into
cppcheck-opensource:masterfrom
Ken-Patrick:clang_defines

Conversation

@Ken-Patrick

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread lib/cppcheck.cpp
for (const std::string &i: mSettings.includePaths)
flags += "-I" + i + " ";

flags += getDefinesFlags(mSettings.userDefines);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm .. an alternative could be to reuse split.

for (const std::string &d: split(mSettings.userDefines, ";"))
    flags += "-D" + d + " ";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please reuse split.. if you do it here like my code or rewrite your getDefinesFlags that is up to you :-)

@danmar

danmar commented May 20, 2020

Copy link
Copy Markdown
Collaborator

As far as I see the CI failures are not your fault.. so ignore that for now.

@danmar
danmar merged commit 79d3f48 into cppcheck-opensource:master May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants