[PATCH] D95559: clang: Fix static_assert in a few contexts in microsoft mode

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 27 14:29:52 PST 2021


rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.

Looks good, and I think we should also backport this to Clang 12.



================
Comment at: clang/lib/Parse/ParseDecl.cpp:4219
     // Parse _Static_assert declaration.
-    if (Tok.is(tok::kw__Static_assert)) {
+    if (Tok.is(tok::kw__Static_assert) || Tok.is(tok::kw_static_assert)) {
       SourceLocation DeclEnd;
----------------
Use `isOneOf`.


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

https://reviews.llvm.org/D95559



More information about the cfe-commits mailing list