Fix -Wdynamic-class-memaccess to skip invalid classes.
authorRichard Trieu <rtrieu@google.com>
Thu, 31 Mar 2016 04:18:07 +0000 (04:18 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 31 Mar 2016 04:18:07 +0000 (04:18 +0000)
commit1c7237ae619d3d1d455f48a601e72c2795f81e40
tree709ff8e14d7d52e9748fe12a21a49e16c7e0fa32
parent936a2b09f366267454b7cff9ffb9e76240137bf8
Fix -Wdynamic-class-memaccess to skip invalid classes.

This warning sometimes will infinitely recurse on CXXRecordDecl's from
ill-formed recursive classes that have fields of themselves.  Skip processing
these classes to prevent this from happening.
Fixes https://llvm.org/bugs/show_bug.cgi?id=27142

llvm-svn: 264991
clang/lib/Sema/SemaChecking.cpp
clang/test/SemaCXX/warn-bad-memaccess.cpp