diff options
-rw-r--r-- | sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp index 4eb1a9ee8..4145c8dec 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/compilersupport.cpp @@ -344,6 +344,14 @@ QByteArrayList emulatedCompilerOptions() case Compiler::Gpp: if (needsClangBuiltinIncludes()) appendClangBuiltinIncludes(&headerPaths); + + // Append the c++ include paths since Clang is unable to find + // <type_traits> etc (g++ 11.3). + const HeaderPaths gppPaths = gppInternalIncludePaths(compilerFromCMake(u"g++"_qs)); + for (const HeaderPath &h : gppPaths) { + if (h.path.contains("c++") || h.path.contains("sysroot")) + headerPaths.append(h); + } break; } |