]> granicus.if.org Git - clang/commit
[Modules][Objective-C] Use complete decl from module when diagnosing missing import
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Mon, 16 Sep 2019 22:00:29 +0000 (22:00 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Mon, 16 Sep 2019 22:00:29 +0000 (22:00 +0000)
commit5f5c648f246380ad993069c4993fdae73a3002e8
treec6ce600adb7c1806c8e81c9285cda72ad684fce3
parentcb90360eef8944a00785e38181d58274de8b974f
[Modules][Objective-C] Use complete decl from module when diagnosing missing import

Summary:
Otherwise the definition (first found) for ObjCInterfaceDecl's might
precede the module one, which will eventually lead to crash, since
diagnoseMissingImport needs one coming from a module.

This behavior changed after Richard's r342018, which started to look
into the definition of ObjCInterfaceDecls.

rdar://problem/49237144

Reviewers: rsmith, arphaman

Subscribers: jkorous, dexonsmith, ributzka, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66982

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@372039 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaLookup.cpp
test/Modules/Inputs/interface-diagnose-missing-import/Foo.framework/Headers/Bar.h [new file with mode: 0644]
test/Modules/Inputs/interface-diagnose-missing-import/Foo.framework/Headers/Foo.h [new file with mode: 0644]
test/Modules/Inputs/interface-diagnose-missing-import/Foo.framework/Modules/module.modulemap [new file with mode: 0644]
test/Modules/Inputs/interface-diagnose-missing-import/Foo.framework/PrivateHeaders/RandoPriv.h [new file with mode: 0644]
test/Modules/interface-diagnose-missing-import.m [new file with mode: 0644]