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

曾 健平 via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 7 00:45:49 PST 2016


Thanks you for you help!

________________________________
School of Computer science, HuaZhong university of science & technology.
Jianping Zeng

From: Reid Kleckner<mailto:rnk at google.com>
Date: 2016-12-07 03:04
To: 曾 健平<mailto:z1215jping at hotmail.com>
CC: llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>
Subject: Re: [llvm-dev] How to add a new diagnostic error message in Clang 2.6?
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<mailto: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<mailto: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/20161207/b2f69dab/attachment.html>


More information about the llvm-dev mailing list