Introduce KDEV_CLANG_EXTRA_ARGUMENTS
ClosedPublic

Authored by kfunk on Dec 22 2015, 11:38 PM.

Details

Summary

This environment variable can be filled with compiler arguments which
will eventually appended to the arguments passed to
clang_parseTranslationUnit.

Sample use-case, adding clazy plugin:

$ export KDEV_CLANG_EXTRA_ARGUMENTS="-Xclang -load -Xclang ClangLazy.so

-Xclang -add-plugin -Xclang clang-lazy"

$ kdevelop

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kfunk updated this revision to Diff 1578.Dec 22 2015, 11:38 PM
kfunk retitled this revision from to Introduce KDEV_CLANG_EXTRA_ARGUMENTS.
kfunk updated this object.
kfunk edited the test plan for this revision. (Show Details)
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptDec 22 2015, 11:38 PM
mwolff accepted this revision.Dec 23 2015, 10:06 PM
mwolff added a reviewer: mwolff.
mwolff added a subscriber: mwolff.
mwolff added inline comments.
languages/clang/duchain/parsesession.cpp
55

std::call_once? or even better, hoist the static result out of the function and make it

static const auto extraArgs = ::extraArgs();
207

please add a comment that this acts as a "smart pointer" to the contained data

208

personally, I don't see any gain from using for_each vs. foreach or range-based for... but pick what you want to use, I don't care too much.

This revision is now accepted and ready to land.Dec 23 2015, 10:06 PM
This revision was automatically updated to reflect the committed changes.
kfunk marked 2 inline comments as done.