diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2022-02-02 08:06:15 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-02-02 18:02:18 +0000 |
commit | e70508509ca4b668e4d9bc68ee09e4197fd84265 (patch) | |
tree | 96bd631c1de869762005dacd4ba4c3cae223daf2 | |
parent | 322594c9dfebf945fa1f518f63b8d9f54d8ccd31 (diff) |
shiboken6: Consider .h files as C++
Previously, shiboken6 and dependent tools would consider .h files as C
(working around by creating a temporary header). This can be worked
around by passing -x c++ to clang.
Task-number: PYSIDE-1802
Change-Id: I5c0d9ef2d6a11a8409be979ccdb52e5eca08656a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Tismer <tismer@stackless.com>
(cherry picked from commit e6a5b97211bbeac737ade08467712b4ddcb0586d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp index 15be8f5a4..8100cab77 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/clangparser.cpp @@ -271,7 +271,9 @@ static CXTranslationUnit createTranslationUnit(CXIndex index, "-Wno-expansion-to-defined", // Workaround for warnings in Darwin stdlib, see // https://github.com/darlinghq/darling/issues/204 #endif - "-Wno-constant-logical-operand" + "-Wno-constant-logical-operand", + "-x", + "c++" // Treat .h as C++, not C }; QByteArrayList clangArgs; |