Author: ioeric Date: Tue Nov 15 13:05:40 2016 New Revision: 287008 URL: http://llvm.org/viewvc/llvm-project?rev=287008&view=rev Log: Add comments on how to print error retuned by tooling::Replacements::add().
Modified: cfe/trunk/include/clang/Tooling/Core/Replacement.h Modified: cfe/trunk/include/clang/Tooling/Core/Replacement.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Tooling/Core/Replacement.h?rev=287008&r1=287007&r2=287008&view=diff ============================================================================== --- cfe/trunk/include/clang/Tooling/Core/Replacement.h (original) +++ cfe/trunk/include/clang/Tooling/Core/Replacement.h Tue Nov 15 13:05:40 2016 @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits