[cfe-dev] Clang Sema class

Jan Korous via cfe-dev cfe-dev at lists.llvm.org
Wed Jan 2 04:49:02 PST 2019


Hi Marcus,

In case this is still relevant - format strings are stored in TableGen files.

For example:
include/clang/Basic/DiagnosticLexKinds.td

…
def warn_header_guard : Warning<
  "%0 is used as a header guard here, followed by #define of a different macro">,
  InGroup<DiagGroup<"header-guard">>;
…

Hope this helps.

Jan

> On Dec 17, 2018, at 6:14 PM, Marcus Johnson via cfe-dev <cfe-dev at lists.llvm.org> wrote:
> 
> Thanks Herb, I'll look into that.
> 
>> On Dec 17, 2018, at 10:47 AM, Hubert Tong <hubert.reinterpretcast at gmail.com <mailto:hubert.reinterpretcast at gmail.com>> wrote:
>> 
>> You could try looking for code that calls EmitFormatDiagnostic.
>> 
>> -- HT
>> 
>> On Mon, Dec 17, 2018 at 6:54 AM Marcus Johnson via cfe-dev <cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>> wrote:
>> Where are format strings stored in the 10,000 line Sema class?
>> 
>> tl;dr, I need to potentially convert the format string from UTF-16 to UTF-8 for further checking.
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev <http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev>
> 
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190102/d04284e5/attachment.html>


More information about the cfe-dev mailing list