[PATCH] D133934: [clang][Interp] Handle sizeof() expressions

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 16 06:23:35 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:290
+
+    if (!ArgType->isConstantSizeType() ||
+        ArgType->isDependentType())
----------------
Documentation for `isConstantSizedType` says it isn't legal to call it on dependent or incomplete types.  so this probably needs to be:

``` if (ArgType->isDependentType() || ArgType->isIncompleteType() || !ArgType->isConstantSizedType())```

In roughly that order.


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

https://reviews.llvm.org/D133934



More information about the cfe-commits mailing list