Clang: Make clangCompleteAt.sh work with standard headers

"clang -cc1" is the frontend only and as such it does not have any
include paths set. Use -Xclang <arg> instead.

[1] https://clang.llvm.org/docs/FAQ.html#id2

Change-Id: I372601cae5c672562b63fa07ed9e638e984fdd58
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Nikolai Kosjar
2017-07-24 14:15:22 +02:00
parent 6b2d6e7965
commit 15793d3318

View File

@@ -94,7 +94,7 @@ runCodeCompletion()
if [ -n "${CINDEXTEST_EXEC}" ]; then if [ -n "${CINDEXTEST_EXEC}" ]; then
command="${CINDEXTEST_EXEC} -code-completion-at=${FILE}:${LINE}:${COLUMN} ${FILE}" command="${CINDEXTEST_EXEC} -code-completion-at=${FILE}:${LINE}:${COLUMN} ${FILE}"
else else
command="${CLANG_EXEC} -cc1 -code-completion-at ${FILE}:${LINE}:${COLUMN} ${FILE}" command="${CLANG_EXEC} -fsyntax-only -Xclang -code-completion-at -Xclang ${FILE}:${LINE}:${COLUMN} ${FILE}"
fi fi
echo "Command: $command" echo "Command: $command"
eval $command eval $command