We do not build texteditor files in unit-tests so some tricks
were required to make ClangFormatIndenter available.
First simple unit-test proofs it builds and runs.
Change-Id: I81d5ea099bd27fd1c1ed8b5b7877299dcc62a67f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Add warning flags to QMAKE_CXXFLAGS_WARN_ON to have them
after default warnings.
Change-Id: Ic94fe36175d3198191251d5b475f8f8ed000bef7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Most of the flags appear twice on llvm-config-7 --cxxflags (at least on
Debian).
Change-Id: I9c5630d61472fa37bce998ec541a0ab561b83722
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
we must not add the llvm libdir if it's a system path. this was already
done in some places, but not in others.
while we're at it, re-shuffle some pre-existing conditionals to make
things consistent.
Task-number: QTCREATORBUG-20178
Change-Id: Ib7e5a81705494e4cf2f83a4782ecd0832b91e511
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
llvm-config can usually be found in PATH on systems which have standard
paths at all. There is no need to specify LLVM_INSTALL_DIR then.
Furthermore, llvm-config has an option --bindir which will tell us the
directory where clang can be found (if installed). No need to apply
strange heuristics based on LLVM_INSTALL_DIR. Finally, we can check
within each .pro file for the conditions to be met using qmake's
require() function. This way we don't need to fiddle with
LLVM_INSTALL_DIR in unrelated places.
Change-Id: I1a6ab092b06de40dfbfa4a9e7053451360fd24c8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
llvm-config-3.9 --cxxflags has -g1 which is substituted by 1.
Change-Id: I626f3f15c659f7de030c08883b5b739b1d636ada
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
We want to avoid build error so we use their flags and remove flags we
don't want.
Change-Id: I471e5195f98658d73d2b04b6e4bf597573ca87ae
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Compiling every header file again and again is quite time comsuming. There
are technics to improve this like preambles(a kind of automated
precompiled header) but they don't share their data between translation
units. This approach provides an automatically generated precompiled
header for every project and subproject to improve the loading time.
Change-Id: I34f5bd4db21951175920e2a9bbf6b97b1d705969
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Clang query is mechanism to use AST matcher to search for code. Think
about regular expression but in the context of AST. So you get a semantic
search tool for C++.
Change-Id: I72e882c5b53a0c52f352a3664847c4c3e4f6fc2e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If we use paths with spaces we cannot split them anymore so we have to
handle unix and windows differently.
Change-Id: Ibfc8c51cfe2ecd68e913ad84e0e1269eb7eeda02
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
We don't want to disable RTTI in unittest so we require to compile them
with RTTI. You can disable yourself RTTI if you don't want them for some
reasons.
Change-Id: I76d05a36442305f379ce3d88b3f6ed4372127002
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
If you have no LLVM installed it was impossible to compile the unit test.
But some unit test don't depend on LLVM. With this change it is now
possible to compile them.
Change-Id: Iac0c1b3cdf6c317e6ba4755acd5f8458db5a7451
Reviewed-by: David Schulz <david.schulz@qt.io>