[PATCH] D137020: [clang][AST] Handle variable declaration with unknown typedef in C
Dilshod Urazov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Oct 29 06:20:05 PDT 2022
urazoff created this revision.
urazoff added reviewers: sammccall, hokein, adamcz.
Herald added a project: All.
urazoff requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
With this patch, declarations containing unknown types are parsed
like declarations, not like expressions. This leads to better
diagnostics and yields InvalidDecl in AST (thus DeclRefExpr's to
them) which is good for compiler users and AST consumers.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137020
Files:
clang/include/clang/Parse/Parser.h
clang/lib/Parse/ParseDecl.cpp
clang/test/Driver/types.c
clang/test/Parser/CompoundStmtScope.c
clang/test/Parser/opencl-atomics-cl20.cl
clang/test/Parser/recovery.c
clang/test/SemaOpenCL/intel-subgroup-avc-ext-types.cl
clang/test/SemaOpenCL/invalid-device-enqueue-types-cl3.0.cl
clang/test/SemaOpenCL/invalid-pipes-cl1.2.cl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137020.471751.patch
Type: text/x-patch
Size: 11902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221029/58101cd4/attachment.bin>
More information about the cfe-commits
mailing list