teak-llvm/clang/test/Modules/objc-category.m
Manman Ren ec315f1002 Modules: for ObjectiveC try to keep the definition invariant.
When deserializing ObjCInterfaceDecl with definition data, if we already have
a definition, try to keep the definition invariant; also pull in the
categories even if it is not what getDefinition returns (this effectively
combines categories).

rdar://27926200
rdar://26708823

llvm-svn: 281119
2016-09-09 23:48:27 +00:00

14 lines
465 B
Objective-C

// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -I %S/Inputs/objc-category %s -verify -fobjc-arc
// expected-no-diagnostics
// We have a definition of the base interface textually included from
// Category.h, the definition is also in the module that includes the base
// interface. We should be able to see the category in the TU.
#include "Category.h"
#import <H3.h>
void test(DVTSourceModel *m) {
[m test:1];
}