Add -Wno-error=unknown flag to clang-format.
Currently newer clang-format options cannot be included in .clang-format files, if not all users can be forced to use an updated version.
This patch tries to solve this by adding an option to clang-format, enabling to ignore unknown (newer) options.
Differential Revision: https://reviews.llvm.org/D86137
diff --git a/llvm/lib/Support/YAMLParser.cpp b/llvm/lib/Support/YAMLParser.cpp
index ca8ffdc..b9bbdc3 100644
--- a/llvm/lib/Support/YAMLParser.cpp
+++ b/llvm/lib/Support/YAMLParser.cpp
@@ -1775,12 +1775,9 @@
bool Stream::failed() { return scanner->failed(); }
-void Stream::printError(Node *N, const Twine &Msg) {
+void Stream::printError(Node *N, const Twine &Msg, SourceMgr::DiagKind Kind) {
SMRange Range = N ? N->getSourceRange() : SMRange();
- scanner->printError( Range.Start
- , SourceMgr::DK_Error
- , Msg
- , Range);
+ scanner->printError(Range.Start, Kind, Msg, Range);
}
document_iterator Stream::begin() {