Details
-
Bug
-
Resolution: Cannot Reproduce
-
P2: Important
-
None
-
5.13.0
-
None
-
Windows 64-bit, VS 2019, LLVM 8
Ubuntu 19.04, LLVM 8, GCC 9
Description
I am using current LLVM version which is 8.0.0 at the moment and qdoc that comes precompiled with Qt has severe problems parsing the C++17 code with it on any platform.
Features specifically broken are:
- Exceptions appear to be disabled when creating the precompiled header
- C++17 appears not to be anebled by default ("if constexpr" is being flagged as unsupported prior to that)
- string_view is not found (C++17 issue again)
The sample errors:
On Windows 10, 64-bit (using LLVM 8, VS 2019, Qt 5.13):
LOG: Build & visit PCH for ACore.module C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.21.27702\include\yvals_core.h:348:2: error: STL1000: Unexpected compiler version, expected Clang 7 or newer. C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\VectorBase.h:731:9: error: cannot use 'throw' with exceptions disabled C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\DictionaryBase.h:118:8: warning: constexpr if is a C++17 extension [-Wc++17-extensions] C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\DictionaryBase.h:137:8: warning: constexpr if is a C++17 extension [-Wc++17-extensions] C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\DictionaryBase.h:189:8: warning: constexpr if is a C++17 extension [-Wc++17-extensions] C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\DictionaryBase.h:256:50: error: no member named 'string_view' in namespace 'std' C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\DictionaryBase.h:256:62: error: expected ')' C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\DictionaryBase.h:256:34: note: to match this '(' C:/dev/Projects/adev/projects/ALibs/ACore/include/ACore\DictionaryBase.h:253:43: error: no return statement in constexpr function LOG: PCH built & visited for ACore.module
On Linux (Ubuntu 19.04, LLVM 8, Qt 5.13):
LOG: Build & visit PCH for ACore.module /home/mv/ADev/projects/ALibs/ACore/include/ACore/VectorBase.h:731:9: error: cannot use 'throw' with exceptions disabled /home/mv/ADev/projects/ALibs/ACore/include/ACore/DictionaryBase.h:118:8: warning: constexpr if is a C++17 extension [-Wc++17-extensions] /home/mv/ADev/projects/ALibs/ACore/include/ACore/DictionaryBase.h:137:8: warning: constexpr if is a C++17 extension [-Wc++17-extensions] /home/mv/ADev/projects/ALibs/ACore/include/ACore/DictionaryBase.h:189:8: warning: constexpr if is a C++17 extension [-Wc++17-extensions] /home/mv/ADev/projects/ALibs/ACore/include/ACore/DictionaryBase.h:256:50: error: no member named 'string_view' in namespace 'std' /home/mv/ADev/projects/ALibs/ACore/include/ACore/DictionaryBase.h:256:62: error: expected ')' /home/mv/ADev/projects/ALibs/ACore/include/ACore/DictionaryBase.h:256:34: note: to match this '(' /home/mv/ADev/projects/ALibs/ACore/include/ACore/DictionaryBase.h:253:43: error: no return statement in constexpr function LOG: PCH built & visited for ACore.module
Apart from these errors there are numerous problems when parsing the documentation as well, mainly inability to match functions, often when the signature contains "constexpr" or "noexcept". That is very likely coming from the fact that the precompiled (PCH) header is corrupted or somehow broken. It is pointless to provide these errors before the PCH is fixed.
I could not find a way to pass additional flags for the PCH compilation. Is there a way to do it? I reckon it could help solve a lots of these issues and would make qdoc a bit more future-proof.