llvm-project/clang/lib/Parse
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
..
CMakeLists.txt [CMake] Reorder libdeps by alphabetical order. 2014-07-14 04:59:27 +00:00
Makefile
ParseAST.cpp Remove unneeded include of DeclCXX.h from libParse. 2014-12-28 01:52:28 +00:00
ParseCXXInlineMethods.cpp Rework parsing of pure-specifiers. Perform the grammar matching and 2015-06-30 01:28:56 +00:00
ParseDecl.cpp C++ support for Objective-C lightweight generics. 2015-07-07 03:58:14 +00:00
ParseDeclCXX.cpp DR1909: Diagnose all invalid cases of a class member sharing its name with the class. 2015-07-06 01:45:27 +00:00
ParseExpr.cpp [OPENMP] Introduced type trait "__builtin_omp_required_simd_align" for default simd alignment. 2015-07-02 03:40:19 +00:00
ParseExprCXX.cpp C++ support for Objective-C lightweight generics. 2015-07-07 03:58:14 +00:00
ParseInit.cpp C++ support for Objective-C lightweight generics. 2015-07-07 03:58:14 +00:00
ParseObjc.cpp Warn when an intended Objective-C specialization was actually a useless protocol qualification. 2015-07-07 03:58:28 +00:00
ParseOpenMP.cpp [OPENMP 4.0] Initial support for 'omp cancel' construct. 2015-07-02 11:25:17 +00:00
ParsePragma.cpp Add assume_safety option for pragma loop vectorize and interleave. 2015-06-11 23:23:17 +00:00
ParseStmt.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
ParseStmtAsm.cpp Revert r240270 ("Fixed/added namespace ending comments using clang-tidy"). 2015-06-22 23:07:51 +00:00
ParseTemplate.cpp Parsing, semantic analysis, and AST for Objective-C type parameters. 2015-07-07 03:57:15 +00:00
ParseTentative.cpp Handle Objective-C type arguments. 2015-07-07 03:57:35 +00:00
Parser.cpp C++ support for Objective-C lightweight generics. 2015-07-07 03:58:14 +00:00
RAIIObjectsForParser.h Add a new error for unexpected semi-colon before closing delimiter. 2015-05-12 21:36:35 +00:00