aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorVolodymyr Sapsai <vsapsai@apple.com>2022-01-28 17:08:21 -0800
committerVolodymyr Sapsai <vsapsai@apple.com>2022-04-04 18:48:30 -0700
commit29444f0444c6d3586969fd6fbe49c8188c02c244 (patch)
treec62ccf5209c8081b1a9b92c813235c1f788cdb8b /flang/lib/Frontend/CompilerInvocation.cpp
parentc7bd9dcb064cc258c97a46f5b473b390360b548e (diff)
downloadllvm-29444f0444c6d3586969fd6fbe49c8188c02c244.zip
llvm-29444f0444c6d3586969fd6fbe49c8188c02c244.tar.gz
llvm-29444f0444c6d3586969fd6fbe49c8188c02c244.tar.bz2
[modules] Merge ObjC interface ivars with anonymous types.
Without the fix ivars with anonymous types can trigger errors like > error: 'TestClass::structIvar' from module 'Target' is not present in definition of 'TestClass' provided earlier > [...] > note: declaration of 'structIvar' does not match It happens because types of ivars from different modules are considered to be different. And it is caused by not merging anonymous `TagDecl` from different modules. To fix that I've changed `serialization::needsAnonymousDeclarationNumber` to handle anonymous `TagDecl` inside `ObjCInterfaceDecl`. But that's not sufficient as C code inside `ObjCInterfaceDecl` doesn't use interface decl as a decl context but switches to its parent (TranslationUnit in most cases). I'm changing that to make `ObjCContainerDecl` the lexical decl context but keeping the semantic decl context intact. Test "check-dup-decls-inside-objc.m" doesn't reflect a change in functionality but captures the existing behavior to prevent regressions. rdar://85563013 Differential Revision: https://reviews.llvm.org/D118525
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions