summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-03-01 19:18:42 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2017-03-01 19:18:42 +0000
commit84df6e99b8835465ae6319f055d14feb9ddcf777 (patch)
tree37f6dcb0ab88c50c5994794f8a9fd5b4a0235de4 /lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py
parentd4f1c487f3f1fd9f66a1877a8807677d1cd88a95 (diff)
downloadbcm5719-llvm-84df6e99b8835465ae6319f055d14feb9ddcf777.tar.gz
bcm5719-llvm-84df6e99b8835465ae6319f055d14feb9ddcf777.zip
[PCH] Avoid VarDecl emission attempt if no owning module avaiable
This is a stopgap fix for PR31863, a regression introduced in r276159. Consider this snippet: struct FVector; struct FVector {}; struct FBox { FVector Min; FBox(int); }; namespace { FBox InvalidBoundingBox(0); } While parsing the DECL_VAR for 'struct FBox', clang recursively read all the dep decls until it finds the DECL_CXX_RECORD forward declaration for 'struct FVector'. Then, it resumes all the way up back to DECL_VAR handling in `ReadDeclRecord`, where it checks if `isConsumerInterestedIn` for the decl. One of the condition for `isConsumerInterestedIn` to return false is if the VarDecl is imported from a module `D->getImportedOwningModule()`, because it will get emitted when we import the relevant module. However, before checking if it comes from a module, clang checks if `Ctx.DeclMustBeEmitted(D)`, which triggers the emission of 'struct FBox'. Since one of its fields is still incomplete, it crashes. Instead, check if `D->getImportedOwningModule()` is true before calling `Ctx.DeclMustBeEmitted(D)`. Differential Revision: https://reviews.llvm.org/D29753 rdar://problem/30173654 llvm-svn: 296656
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/timeout/TestCallWithTimeout.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud