llvm-project/clang/lib
Richard Smith 85567ddaba [modules] Fix crash in complex class merging scenario.
When we merge together class definitions, we can end up with the canonical
declaration of a field not being the one that was lexically within the
canonical definition of the class. Additionally, when we merge class
definitions via update records (eg, for a template specialization whose
declaration is instantiated in one module and whose definition is instantiated
in multiple others), we can end up with the list of lexical contents for the
class not including a particular declaration of a field whose lexical parent is
that class definition. In the worst case, we have a field whose canonical
declaration's lexical parent has no fields, and in that case this attempt to
number the fields by walking the fields in the declaration of the class that
contained one of the canonical fields will fail.

Instead, when numbering fields in a class, do the obvious thing: walk the
fields in the definition.

I'm still trying to reduce a testcase; the setup that leads to the above
scenario seems to be quite fragile.

llvm-svn: 318245
2017-11-15 01:33:46 +00:00
..
ARCMigrate
AST [modules] Fix crash in complex class merging scenario. 2017-11-15 01:33:46 +00:00
ASTMatchers Add ObjC exception statement AST matchers 2017-11-11 22:46:15 +00:00
Analysis [analyzer] Model correct dispatch_once() 'done' value in BodyFarm 2017-11-06 22:12:19 +00:00
Basic Simplify CpuIs code to use include from LLVM 2017-11-15 00:11:24 +00:00
CodeGen Simplify CpuIs code to use include from LLVM 2017-11-15 00:11:24 +00:00
CrossTU
Driver Switch -mcount and -finstrument-functions to emit EnterExitInstrumenter attributes 2017-11-14 21:13:27 +00:00
Edit
Format Refactor ContinuationIndenter's breakProtrudingToken logic. 2017-11-14 09:19:53 +00:00
Frontend Switch -mcount and -finstrument-functions to emit EnterExitInstrumenter attributes 2017-11-14 21:13:27 +00:00
FrontendTool
Headers [X86] test/testn intrinsics lowering to IR. clang side 2017-11-13 12:50:52 +00:00
Index [index] tag declarations should use the decl role instead of ref 2017-11-09 20:50:59 +00:00
Lex [refactor][extract] insert semicolons into extracted/inserted code 2017-11-03 18:11:22 +00:00
Parse [Parser] Fix TryParseLambdaIntroducer() error handling 2017-11-06 17:42:17 +00:00
Rewrite
Sema [OPENMP] Fix DSA analysis for threadprivates after deserialization. 2017-11-14 21:01:01 +00:00
Serialization Adjust r316292 - remove the anonymous union for sharing a bitfield in FunctionDecl. 2017-11-11 18:02:29 +00:00
StaticAnalyzer [clang] Remove redundant return [NFC] 2017-11-13 19:29:31 +00:00
Tooling [refactor][selection] canonicalize decl ref callee to the call expr 2017-11-14 23:10:50 +00:00
CMakeLists.txt