[llvm-dev] How to add a new diagnostic error message in Clang 2.6?

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 6 11:04:31 PST 2016


Check DiagnosticParseKinds.inc in your build directory to verify that it
has a line like:
DIAG(err_x86_builtin_invalid_rounding, ... "...")

It should appear here:
llvm/build/tools/clang/include/clang/Basic/DiagnosticParseKinds.inc

Good luck with the translation! Clang seems to be the only major C++
compiler without at least partial translation for its diagnostics. =/

On Thu, Dec 1, 2016 at 9:58 PM, 曾 健平 via llvm-dev <llvm-dev at lists.llvm.org>
wrote:

> Hi, everyone.
>
> I want to add a new diagnostic error message for Chinese in Clang 2.6
> showed as follows.
> def err_expected_semi_declaration_chinese : Error<
>    "您在该行声明之后是否少了个';'或者是中文输入法?">;
>
> So i append a new one in the end of file DiagnosticParseKinds.td, and
> then recompile it.
> However, there is a error occurs:
>
> llvm2.6/llvm/tools/clang/lib/Parse/ParseDecl.cpp:370: error:
> ‘err_expected_semi_declaration_chinese’ is not a member of ‘clang::diag’
>
> Have any people point out whats the reason about it and how to fix it ?
> Thanks!
>
> Xlous zeng.
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161206/14f5ea00/attachment.html>


More information about the llvm-dev mailing list