tbaeder added inline comments.
================ Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:289 + QualType ArgType = E->getTypeOfArgument(); + return this->emitConst(E, Ctx.getASTContext().getTypeSize(ArgType)); + } ---------------- erichkeane wrote: > You probably want `getTypeSizeInChars`. `getTypeSize` returns it in bits, so > this would give the wrong answer. You should probably add some tests to make > sure the values you are getting back are sane (like `char` is 1, etc). Yeah, right. I explicitly didn't compare with fixed values when writing the tests so I don't run into the usual problems, but they wouldn't caught this problem... CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133934/new/ https://reviews.llvm.org/D133934 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits