hans added a comment. In D72703#1832678 <https://reviews.llvm.org/D72703#1832678>, @rnk wrote:
> I waited to see if there was any other feedback, but I'm in favor of this. > > Should we try to come up with better pragma names? `clang max_tokens` doesn't > seem to call to mind what it does: warn if there have been more than this > many tokens so far in the translation unit. `max_file_tokens` has to do with > the number of tokens in the translation unit overall, but it uses the > terminology "file" instead of "translation unit". The user could interpret > that as being in the current source file, ignoring includes. Thanks for thinking about the names. I agree they are not ideal. > Some ideas for the immediate version: > > - clang max_tokens_so_far > - clang max_tokens_lexed > - clang max_tokens_here I went with max_tokens because it's shorter, and I figured maybe the "here" could be implicit as most things happen where the pragma is. But since we'll also have the per-tu variant, maybe it makes sense to have a longer name. Of your alternatives I like max_tokens_here best. > Some ideas for end-of-tu: > > - clang max_translation_unit_tokens > - clang max_tu_tokens > - clang global_max_tokens I went with "file" because tu is such a technical term and I'm not sure we generally use it in clang's interface. What do you think about max_tokens_total? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72703/new/ https://reviews.llvm.org/D72703 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits