summaryrefslogtreecommitdiff
path: root/lib/Format/Format.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-06-12 14:02:15 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-06-12 14:02:15 +0000
commit9986295b4f4702e5e02102cb257ae71fceedffec (patch)
treed2c566c85a6ef92e698ec19be71888839dc3645a /lib/Format/Format.cpp
parent43a42fb5cd0c1eb7a5f3ac97b9d5e77c10bd8c22 (diff)
downloadclang-9986295b4f4702e5e02102cb257ae71fceedffec.tar.gz
clang-9986295b4f4702e5e02102cb257ae71fceedffec.tar.bz2
clang-9986295b4f4702e5e02102cb257ae71fceedffec.tar.xz
Replace llvm::error_code with std::error_code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/Format.cpp')
-rw-r--r--lib/Format/Format.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp
index 6b57b184d2..176cb49df8 100644
--- a/lib/Format/Format.cpp
+++ b/lib/Format/Format.cpp
@@ -465,7 +465,7 @@ bool getPredefinedStyle(StringRef Name, FormatStyle::LanguageKind Language,
return true;
}
-llvm::error_code parseConfiguration(StringRef Text, FormatStyle *Style) {
+std::error_code parseConfiguration(StringRef Text, FormatStyle *Style) {
assert(Style);
FormatStyle::LanguageKind Language = Style->Language;
assert(Language != FormatStyle::LK_None);
@@ -2025,7 +2025,7 @@ FormatStyle getStyle(StringRef StyleName, StringRef FileName,
if (StyleName.startswith("{")) {
// Parse YAML/JSON style from the command line.
- if (llvm::error_code ec = parseConfiguration(StyleName, &Style)) {
+ if (std::error_code ec = parseConfiguration(StyleName, &Style)) {
llvm::errs() << "Error parsing -style: " << ec.message() << ", using "
<< FallbackStyle << " style\n";
}
@@ -2066,12 +2066,12 @@ FormatStyle getStyle(StringRef StyleName, StringRef FileName,
if (IsFile) {
std::unique_ptr<llvm::MemoryBuffer> Text;
- if (llvm::error_code ec =
+ if (std::error_code ec =
llvm::MemoryBuffer::getFile(ConfigFile.c_str(), Text)) {
llvm::errs() << ec.message() << "\n";
break;
}
- if (llvm::error_code ec = parseConfiguration(Text->getBuffer(), &Style)) {
+ if (std::error_code ec = parseConfiguration(Text->getBuffer(), &Style)) {
if (ec == ParseError::Unsuitable) {
if (!UnsuitableConfigFiles.empty())
UnsuitableConfigFiles.append(", ");