summaryrefslogtreecommitdiff
path: root/lib/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2015-07-07 03:58:28 +0000
committerDouglas Gregor <dgregor@apple.com>2015-07-07 03:58:28 +0000
commit746c7a1520e1bfb96e55ce474f2f2d1dc87c43df (patch)
tree974d048e6ceef5683c5f7ce6763e6353236581c0 /lib/Basic/IdentifierTable.cpp
parent61fd1cbc6d9a4fa6f5e02166390e0de7e9a38a1d (diff)
downloadclang-746c7a1520e1bfb96e55ce474f2f2d1dc87c43df.tar.gz
Warn when an intended Objective-C specialization was actually a useless protocol qualification.
Warn in cases where one has provided redundant protocol qualification that might be a typo for a specialization, e.g., NSArray<NSObject>, which is pointless (NSArray declares that it conforms to NSObject) and is likely to be a typo for NSArray<NSObject *>, i.e., an array of NSObject pointers. This warning is very narrow, only applying when the base type being qualified is parameterized, has the same number of parameters as their are protocols listed, all of the names can also refer to types (including Objective-C class types, of course), and at least one of those types is an Objective-C class (making this a typo for a missing '*'). The limitations are partly for performance reasons (we don't want to do redundant name lookup unless we really need to), and because we want the warning to apply in very limited cases to limit false positives. Part of rdar://problem/6294649. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/IdentifierTable.cpp')
0 files changed, 0 insertions, 0 deletions