[PATCH] D154784: [clang] Fix crash caused by PseudoObjectExprBitfields::NumSubExprs overflow

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 11 10:17:50 PDT 2023


rjmccall added inline comments.


================
Comment at: clang/include/clang/AST/Stmt.h:603
 
-    // These don't need to be particularly wide, because they're
-    // strictly limited by the forms of expressions we permit.
-    unsigned NumSubExprs : 8;
-    unsigned ResultIndex : 32 - 8 - NumExprBits;
+    // Whether the PseudoObjectExpr has result.
+    unsigned HasResult : 1;
----------------
aaron.ballman wrote:
> 
Please remove the comment, which is incorrect.  Otherwise, I think this is fine.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154784



More information about the cfe-commits mailing list