diff options
author | Martin Smith <martin.smith@qt.io> | 2018-02-02 13:26:00 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-02-05 10:35:08 +0000 |
commit | af023844d460d5a1530ebb5e4faa80460f69164b (patch) | |
tree | 9abeea02d2dadba6e73801f5710561f2a3423577 | |
parent | e3d2285415de016464c2828b5cd95f12366a8f0c (diff) | |
download | qttools-af023844d460d5a1530ebb5e4faa80460f69164b.tar.gz |
qdoc: Hide clang errors for \fn commands in prepare phase
When clang parsing errors were detected in the prepare phase, they were
being printed without the preceding qdoc warning that shows where they
occur in the source file. The qdoc warning was not printed because qdoc
was running in the prepare phase, but the clang errors were printed, and
that was wrong. This update ensures that the clang parsing errors are only
printed in the generate phase (or in singleexec mode).
Change-Id: I011fa06626a5e9930fde329113d2bbac8830473b
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 6a6908914..9c8a5c2b5 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1442,7 +1442,7 @@ Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg visitor.visitFnArg(cur, &fnNode, ignoreSignature); if (fnNode == 0) { unsigned diagnosticCount = clang_getNumDiagnostics(tu); - if (diagnosticCount > 0) { + if (diagnosticCount > 0 && (!Generator::preparing() || Generator::singleExec())) { bool report = true; QStringList signature = fnArg.split(QLatin1String("::")); if (signature.size() > 1) { |