From: Eric Liu Date: Tue, 15 Nov 2016 19:05:40 +0000 (+0000) Subject: Add comments on how to print error retuned by tooling::Replacements::add(). X-Git-Tag: llvmorg-4.0.0-rc1~4509 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fafbd486ac1ed4b773f1ba9a106dda1a93169410;p=platform%2Fupstream%2Fllvm.git Add comments on how to print error retuned by tooling::Replacements::add(). llvm-svn: 287008 --- diff --git a/clang/include/clang/Tooling/Core/Replacement.h b/clang/include/clang/Tooling/Core/Replacement.h index 1442beb..5bb1e7f 100644 --- a/clang/include/clang/Tooling/Core/Replacement.h +++ b/clang/include/clang/Tooling/Core/Replacement.h @@ -164,8 +164,9 @@ class Replacements { /// it returns an llvm::Error, i.e. there is a conflict between R and the /// existing replacements (i.e. they are order-dependent) or R's file path is /// different from the filepath of existing replacements. Callers must - /// explicitly check the Error returned. This prevents users from adding - /// order-dependent replacements. To control the order in which + /// explicitly check the Error returned, and the returned error can be + /// converted to a string message with `llvm::toString()`. This prevents users + /// from adding order-dependent replacements. To control the order in which /// order-dependent replacements are applied, use merge({R}) with R referring /// to the changed code after applying all existing replacements. /// Two replacements A and B are considered order-independent if applying them