[PATCH] D26964: Handle more declarations in DeclContextPrinter to fix -print-decl-contexts crashes
Alex Lorenz via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 22 04:17:24 PST 2016
arphaman created this revision.
arphaman added reviewers: rsmith, mehdi_amini.
arphaman added a subscriber: cfe-commits.
arphaman set the repository for this revision to rL LLVM.
This patch handles more declarations in DeclContextPrinter to avoid crashes when clang is given the `-print-decl-contexts` option. I would like to get an opinion on the testing in this patch - the current `-print-decl-contexts` test doesn't check the output, so this patch follows the same testing protocol. Do you think I should also check the output of `-print-decl-contexts`?
This patch contains 7 commits that I squashed just for review to make it easier:
- DeclContextPrinter: Handle StaticAssertDecl
- DeclContextPrinter: Handle variable template declaration
- DeclContextPrinter: Handle Access specifier declaration
- DeclContextPrinter: Handle ClassTemplateSpecialization and ClassTemplatePartialSpecialization declarations
- DeclContextPrinter: Handle EmptyDecl
- DeclContextPrinter: Handle UsingDecl
- DeclContextPrinter: Handle FriendDecl
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4228 bytes
Desc: not available
More information about the cfe-commits