[PATCH] Fix crash in typo correction while correcting enum within a struct in C
Olivier Goffart
ogoffart at kde.org
Thu Jan 8 13:12:40 PST 2015
Hi,
Please review the attached patch.
It fix a crash while trying to compile the code that is in the testcase (in C
mode). This crash is a regression since 3.5
The problem is that "isCXXClassMember" for the NameDecl of the enum values
returns true even tough we are in C mode. Therefore, the DeclContext is not a
CXXRecordDecl, but just a plain RecordDecl.
I'm taking the least intrusive approach by handling the case in which the cast
would otherwise fail.
Thanks
--
Olivier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-crash-in-typo-correction-while-correcting-enum-w.patch
Type: text/x-patch
Size: 1740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150108/f9c0d510/attachment.bin>
More information about the cfe-commits
mailing list