haoNoQ wrote: > serializing the pragmas themselves as AST nodes
These pragmas don't really translate very well into the AST. Similarly to `#pragma clang diagnostic`, they can be placed weirdly "across" other AST nodes, like: ``` #pragma clang unsafe_buffer_usage begin void foo() { #pragma clang unsafe_buffer_usage end } ``` We could support it in the same way that clang supports Duff's Device but I don't think this is really a good idea. We ultimately want them to be textual, a preprocessor-level construct, because that's what security audits are looking for: an extremely clear sign that this is where unchecked pointer operations live. So that they could tell it without looking at anything else in the code. https://github.com/llvm/llvm-project/pull/92031 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits