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

曾 健平 via llvm-dev llvm-dev at lists.llvm.org
Thu Dec 1 21:58:06 PST 2016


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.


More information about the llvm-dev mailing list