summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/compileroptionsbuilder.cpp
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2017-11-06 16:00:25 +0100
committerIvan Donchevskii <ivan.donchevskii@qt.io>2017-11-22 10:56:10 +0000
commit08e3d8f0117d3c5419250bad1749bc3f03703d71 (patch)
tree6f75137dd6857c1a0addd7bf6543ebd23e6c7ac0 /src/plugins/cpptools/compileroptionsbuilder.cpp
parent1601f53542027017b43531dc58f202d1ba2635cb (diff)
downloadqt-creator-08e3d8f0117d3c5419250bad1749bc3f03703d71.tar.gz
Clang: Android: fix clang code model errors
Add missing gcc include directories in Android toolchain. This introduces the similar "magic" that we have in qmake (*qtsource*/qtbase/mkspecs/common/android-base-head.conf) but allows us to have those paths wherever we use android toolchain. Change-Id: I5740f1f2339fd30670567f24db2be2454f665f41 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r--src/plugins/cpptools/compileroptionsbuilder.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp
index 8f1ed2c416..af9ce9bf2c 100644
--- a/src/plugins/cpptools/compileroptionsbuilder.cpp
+++ b/src/plugins/cpptools/compileroptionsbuilder.cpp
@@ -451,16 +451,10 @@ bool CompilerOptionsBuilder::excludeDefineDirective(const ProjectExplorer::Macro
if (macro.key == "__cplusplus")
return true;
- // gcc 4.9 has:
- // #define __has_include(STR) __has_include__(STR)
- // #define __has_include_next(STR) __has_include_next__(STR)
- // The right-hand sides are gcc built-ins that clang does not understand, and they'd
- // override clang's own (non-macro, it seems) definitions of the symbols on the left-hand
- // side.
- if (isGccOrMinGwToolchain(m_projectPart.toolchainType)
- && macro.key.contains("has_include")) {
+ // Ignore for all compiler toolchains since LLVM has it's own implementation for
+ // __has_include(STR) and __has_include_next(STR)
+ if (macro.key.startsWith("__has_include"))
return true;
- }
// If _FORTIFY_SOURCE is defined (typically in release mode), it will
// enable the inclusion of extra headers to help catching buffer overflows