tbaeder added inline comments.
================ Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:444 + // alignment of the referenced type. + if (const ReferenceType *Ref = ArgType->getAs<ReferenceType>()) + ArgType = Ref->getPointeeType(); ---------------- aaron.ballman wrote: > You're missing the rest of the standards quote from > http://eel.is/c++draft/expr.alignof#3. There is some logic missing here for > array types. Getting the alignment of an array gives you the alignment of its > element type. (And there don't seem to be any tests for calling alignof on an > array, so we should add some.) This seems to be handled by `ASTContext`? It "just works" at least and this added code block is almost copy/paste from the current constant interpreter. I'll add some tests though. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D137240/new/ https://reviews.llvm.org/D137240 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits