]> granicus.if.org Git - clang/commit
Improve the Objective-C common-type computation used by the ternary operator.
authorDouglas Gregor <dgregor@apple.com>
Tue, 7 Jul 2015 03:58:01 +0000 (03:58 +0000)
committerDouglas Gregor <dgregor@apple.com>
Tue, 7 Jul 2015 03:58:01 +0000 (03:58 +0000)
commitc575231ea9dfccafa44d5c49ea05063fb3efb7fc
tree15168d9354bb612209fb8adc641a8a5de8710788
parenta6620f3825bfe120c96c1bac7d62e0dcd34f33a0
Improve the Objective-C common-type computation used by the ternary operator.

The Objective-C common-type computation had a few problems that
required a significant rework, including:
  - Quadradic behavior when finding the common base type; now it's
  linear.
  - Keeping around type arguments when computing the common type
  between a specialized and an unspecialized type
  - Introducing redundant protocol qualifiers.

Part of rdar://problem/6294649. Also fixes rdar://problem/19572837 by
addressing a longstanding bug in
ASTContext::CollectInheritedProtocols().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241544 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/AST/Type.h
lib/AST/ASTContext.cpp
lib/AST/DeclObjC.cpp
lib/AST/Type.cpp
lib/Sema/SemaExpr.cpp
test/SemaObjC/block-type-safety.m
test/SemaObjC/conditional-expr-8.m
test/SemaObjC/conditional-expr.m
test/SemaObjC/parameterized_classes_subst.m
test/SemaObjC/protocol-warn.m