[PATCH] D50763: [Parser] Refactor and fix bugs in late-parsing
Hamza Sood via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 15 04:12:30 PDT 2018
hamzasood created this revision.
hamzasood added reviewers: erichkeane, v.g.vassilev, malcolm.parsons, rsmith.
Herald added a reviewer: javed.absar.
Herald added subscribers: cfe-commits, kristof.beyls, eraman.
This patch extracts the eof/stop token pattern used in late-parsing to a re-usable RAII class. This simplifies a lot of the late-parsing code.
A few related bugs were fixed in the process:
- Late-parsing a method with default arguments but without an exception specification would result in an invalid union access. It was mostly harmless but it's technically undefined behaviour.
- When an inherited late-parsed parameter is encountered, the associated declaration is force-casted to FunctionDecl. This caused a crash when the declaration is a template.
Repository:
rC Clang
https://reviews.llvm.org/D50763
Files:
include/clang/Parse/Parser.h
include/clang/Sema/Sema.h
lib/Parse/ParseCXXInlineMethods.cpp
lib/Parse/ParseDeclCXX.cpp
lib/Sema/SemaExprCXX.cpp
test/CXX/dcl.decl/dcl.meaning/dcl.fct.default/p4.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50763.160763.patch
Type: text/x-patch
Size: 21751 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180815/60465e04/attachment-0001.bin>
More information about the cfe-commits
mailing list