diff options
Diffstat (limited to 'clang/lib/Format')
-rw-r--r-- | clang/lib/Format/Format.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Format/UnwrappedLineParser.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp index 686e541..093e88f 100644 --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -2184,8 +2184,9 @@ std::error_code parseConfiguration(llvm::MemoryBufferRef Config, Input >> Styles; if (Input.error()) return Input.error(); + if (Styles.empty()) + return make_error_code(ParseError::Success); - assert(!Styles.empty()); const auto StyleCount = Styles.size(); // Start from the second style as (only) the first one may be the default. diff --git a/clang/lib/Format/UnwrappedLineParser.cpp b/clang/lib/Format/UnwrappedLineParser.cpp index dec71191..5e2584e 100644 --- a/clang/lib/Format/UnwrappedLineParser.cpp +++ b/clang/lib/Format/UnwrappedLineParser.cpp @@ -60,7 +60,7 @@ void printLine(llvm::raw_ostream &OS, const UnwrappedLine &Line, OS << "\n"; } -LLVM_ATTRIBUTE_UNUSED static void printDebugInfo(const UnwrappedLine &Line) { +[[maybe_unused]] static void printDebugInfo(const UnwrappedLine &Line) { printLine(llvm::dbgs(), Line); } |