diff options
author | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2016-04-12 13:11:01 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> | 2016-04-13 07:13:25 +0000 |
commit | e2e3be09e36f89f4db92c443ec9f7fb1dab70624 (patch) | |
tree | dcf2b67825d017fffd2d14830a9b7450e7fffb6a /src/plugins/cpptools/compileroptionsbuilder.cpp | |
parent | 266036fe6e7c40b1ee372605c51c6616cfdb3a30 (diff) | |
download | qt-creator-e2e3be09e36f89f4db92c443ec9f7fb1dab70624.tar.gz |
Clang: Enable exceptions explicitly
For some reason, clang 3.8.0 on Windows does not enable exceptions anymore,
which leads to parse errors in MSVC headers (reported upstream [1]).
With this change, we can finally parse main/mainwindow.cpp of a Qt Widgets
Application for a MSVC2015 Kit and libclang 3.8.0 without any error.
[1] https://llvm.org/bugs/show_bug.cgi?id=27324
Change-Id: I532ad4852a06318baf083d363378bc577b3c4309
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/plugins/cpptools/compileroptionsbuilder.cpp')
-rw-r--r-- | src/plugins/cpptools/compileroptionsbuilder.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/cpptools/compileroptionsbuilder.cpp b/src/plugins/cpptools/compileroptionsbuilder.cpp index 5b17628682..43605a075b 100644 --- a/src/plugins/cpptools/compileroptionsbuilder.cpp +++ b/src/plugins/cpptools/compileroptionsbuilder.cpp @@ -92,6 +92,12 @@ void CompilerOptionsBuilder::addTargetTriple() } } +void CompilerOptionsBuilder::enableExceptions() +{ + add(QLatin1String("-fcxx-exceptions")); + add(QLatin1String("-fexceptions")); +} + void CompilerOptionsBuilder::addHeaderPathOptions() { typedef ProjectPartHeaderPath HeaderPath; |