[PATCH] D133574: [C2x] reject type definitions in offsetof
Shafik Yaghmour via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 12 13:18:24 PDT 2022
shafik added inline comments.
================
Comment at: clang/include/clang/Parse/Parser.h:2283
case DeclSpecContext::DSC_top_level:
+ case DeclSpecContext::DSC_offsetof:
return true;
----------------
Why `true` for this case? What does this allow that we want? Do we test it?
================
Comment at: clang/lib/Parse/ParseExpr.cpp:2583
+ TypeResult Ty =
+ ParseTypeName(/*Range*/ nullptr, DeclaratorContext::OffsetOf);
if (Ty.isInvalid()) {
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133574/new/
https://reviews.llvm.org/D133574
More information about the cfe-commits
mailing list