[PATCH] D102064: Parse vector bool when stdbool.h and altivec.h are included

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 11 08:10:55 PDT 2021


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/Parse/ParseDecl.cpp:7331-7332
     }
-    if (Next.getIdentifierInfo() == Ident_bool) {
+    if ((Next.getIdentifierInfo() == Ident_bool) ||
+        Next.getIdentifierInfo() == Ident_Bool) {
       Tok.setKind(tok::kw___vector);
----------------
Minor nit: remove (inconsistently applied) extra parentheses.


================
Comment at: clang/lib/Parse/Parser.cpp:515
 
+  if (getLangOpts().AltiVec)
+    Ident_Bool = &PP.getIdentifierTable().get("_Bool");
----------------
No need for an extra `if` block. Just need to figure out which block above this should go in.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102064



More information about the cfe-commits mailing list