r302741 - clang/lib/Tooling/RefactoringCallbacks.cpp: Avoid std::errc::bad_message.

NAKAMURA Takumi via cfe-commits cfe-commits at lists.llvm.org
Wed May 10 15:30:45 PDT 2017


Author: chapuni
Date: Wed May 10 17:30:44 2017
New Revision: 302741

URL: http://llvm.org/viewvc/llvm-project?rev=302741&view=rev
Log:
clang/lib/Tooling/RefactoringCallbacks.cpp: Avoid std::errc::bad_message.

Modified:
    cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp

Modified: cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp?rev=302741&r1=302740&r2=302741&view=diff
==============================================================================
--- cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp (original)
+++ cfe/trunk/lib/Tooling/RefactoringCallbacks.cpp Wed May 10 17:30:44 2017
@@ -171,7 +171,7 @@ ReplaceNodeWithTemplate::create(StringRe
           return make_error<StringError>(
               "Unterminated ${...} in replacement template near " +
                   ToTemplate.substr(Index),
-              std::make_error_code(std::errc::bad_message));
+              llvm::inconvertibleErrorCode());
         }
         std::string SourceNodeName =
             ToTemplate.substr(Index + 2, EndOfIdentifier - Index - 2);
@@ -182,7 +182,7 @@ ReplaceNodeWithTemplate::create(StringRe
         return make_error<StringError>(
             "Invalid $ in replacement template near " +
                 ToTemplate.substr(Index),
-            std::make_error_code(std::errc::bad_message));
+            llvm::inconvertibleErrorCode());
       }
     } else {
       size_t NextIndex = ToTemplate.find('$', Index + 1);




More information about the cfe-commits mailing list