llvm-project/clang/lib
Douglas Gregor 10dc9d80cb 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.

llvm-svn: 241547
2015-07-07 03:58:28 +00:00
..
ARCMigrate Switch users of the 'for (StmtRange range = stmt->children(); range; ++range)‘ pattern to range for loops. 2015-07-02 21:03:14 +00:00
AST C++ support for Objective-C lightweight generics. 2015-07-07 03:58:14 +00:00
ASTMatchers Replace some const std::string & with llvm::StringRef or std::string 2015-07-06 08:47:15 +00:00
Analysis Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
Basic Revert "Refactored ARMTargetInfo in order to use the API of llvm/lib/Support/TargetParser.cpp 2015-07-03 16:41:13 +00:00
CodeGen Substitute type arguments into uses of Objective-C interface members. 2015-07-07 03:57:53 +00:00
Driver [Driver] Use llvm::Triple methods to handle -EL and -EB. 2015-07-06 23:59:45 +00:00
Edit [edit] Don't hit an assert when trying to delete a trailing space at EOF 2015-03-29 18:07:29 +00:00
Format clang-format: [JS] Properly reset parse state after parsing interface. 2015-07-06 14:26:04 +00:00
Frontend Resubmit "Pass down the -flto option to the -cc1 job" (r239481) 2015-07-06 16:23:00 +00:00
FrontendTool Provide a BuryPointer for unique_ptrs. 2014-08-29 16:53:14 +00:00
Headers Add the missing return statements from revision 241399. 2015-07-05 10:54:10 +00:00
Index Rename MacroDefinition -> MacroDefinitionRecord, Preprocessor::MacroDefinition -> MacroDefinition. 2015-05-04 02:25:31 +00:00
Lex C++ support for Objective-C lightweight generics. 2015-07-07 03:58:14 +00:00
Parse Warn when an intended Objective-C specialization was actually a useless protocol qualification. 2015-07-07 03:58:28 +00:00
Rewrite Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
Sema Warn when an intended Objective-C specialization was actually a useless protocol qualification. 2015-07-07 03:58:28 +00:00
Serialization Substitute type arguments into uses of Objective-C interface members. 2015-07-07 03:57:53 +00:00
StaticAnalyzer Rewrite users of Stmt::child_begin/end into for-range loops. 2015-07-03 15:12:24 +00:00
Tooling Driver: Remove the Job class. NFC 2015-07-02 22:52:08 +00:00
CMakeLists.txt Fix build with various feature flag combinations 2014-07-14 22:17:22 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00