[all-commits] [llvm/llvm-project] 57c5c1: [clang][ExprConstant] fix __builtin_object_size fo...
Nick Desaulniers via All-commits
all-commits at lists.llvm.org
Mon May 22 11:48:16 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 57c5c1ab2a188b7962c9de5ac0f95e3c7441940a
https://github.com/llvm/llvm-project/commit/57c5c1ab2a188b7962c9de5ac0f95e3c7441940a
Author: Nick Desaulniers <ndesaulniers at google.com>
Date: 2023-05-22 (Mon, 22 May 2023)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/lib/AST/ExprConstant.cpp
M clang/test/CodeGen/object-size.c
Log Message:
-----------
[clang][ExprConstant] fix __builtin_object_size for flexible array members
As reported by @kees, GCC treats __builtin_object_size of structures
containing flexible array members (aka arrays with incomplete type) not
just as the sizeof the underlying type, but additionally the size of the
members in a designated initializer list.
Fixes: https://github.com/llvm/llvm-project/issues/62789
Reviewed By: erichkeane
Differential Revision: https://reviews.llvm.org/D150892
More information about the All-commits
mailing list