[PATCH] D129048: Rewording the "static_assert" to static assertion

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 1 17:06:23 PDT 2022


thakis added a comment.

This change caused a ton of churn, for what I understand fix the diag in C mode when assert.h is not included.

IMHO, it would've been better to change the diag to say either `static_assert` as before in c++ mode or when assert.h is included (i.e. almost always), and `_Static_assert` else. You can use PP.getLastMacroWithSpelling() to (effectively) detect if assert.h was included.

Is this something y'all had considered?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129048/new/

https://reviews.llvm.org/D129048



More information about the cfe-commits mailing list