forked from qt-creator/qt-creator
ClangFormat: Allow unknown options in .clang-format file
This commit disables syntax checks for the .clang-format file, enabling its use even if it contains errors. Removed pop-up shown when save .clang-format file with errors but left warning when editing it in Code Style Tab. Fixes: QTCREATORBUG-30087 Change-Id: I37a0b1e9d602fcbe4fbbc27f7ab190bcd5c1a1fd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -256,8 +256,8 @@ void ClangFormatGlobalConfigWidget::initCurrentProjectLabel()
|
||||
|
||||
bool ClangFormatGlobalConfigWidget::projectClangFormatFileExists()
|
||||
{
|
||||
llvm::Expected<clang::format::FormatStyle> styleFromProjectFolder
|
||||
= clang::format::getStyle("file", m_project->projectFilePath().path().toStdString(), "none");
|
||||
llvm::Expected<clang::format::FormatStyle> styleFromProjectFolder = clang::format::getStyle(
|
||||
"file", m_project->projectFilePath().path().toStdString(), "none", "", nullptr, true);
|
||||
|
||||
return styleFromProjectFolder && !(*styleFromProjectFolder == clang::format::getNoStyle());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user