diff options
author | Cristian Adam <cristian.adam@qt.io> | 2020-03-23 22:16:46 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@qt.io> | 2020-03-24 09:50:45 +0000 |
commit | 0366a8aadb349375062b9757ddd398c5f4f44af7 (patch) | |
tree | fe5d83c6f8edb1df5ae6e5116736e317dd8b285b /src/plugins/clangformat | |
parent | b30aa7fda5d0ef8a764b14f27c8e37e3fcdf9b97 (diff) |
ClangFormat: Compile fix for MSVC
When vanilla LLVM/Clang is used the #warning statement
causes actually an error on MSVC.
Change-Id: Id3f36efc1b21d48e52a9c44036b99a5b4d9a0d5c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/clangformat')
-rw-r--r-- | src/plugins/clangformat/clangformatplugin.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/clangformat/clangformatplugin.cpp b/src/plugins/clangformat/clangformatplugin.cpp index 561b7e888ec..2ebef54584d 100644 --- a/src/plugins/clangformat/clangformatplugin.cpp +++ b/src/plugins/clangformat/clangformatplugin.cpp @@ -153,10 +153,12 @@ bool ClangFormatPlugin::initialize(const QStringList &arguments, QString *errorS } return true; #else +#ifndef Q_CC_MSVC #warning ClangFormat: building dummy plugin due to unmodified Clang, see README.md for more info - *errorString = "Disabling ClangFormat plugin as it has not been built against a modified Clang's libFormat." +#endif + *errorString = QStringLiteral("Disabling ClangFormat plugin as it has not been built against a modified Clang's libFormat." "For more information see the Qt Creator README at " - "https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md"; + "https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/README.md"); return false; #endif } |