llvm-project/clang/test
Devin Coughlin 5df6b94381 [analyzer] ObjCGenerics: Don't warn on cast conversions involving explicit cast
The ObjCGenerics checker warns on a cast when there is no subtyping relationship
between the tracked type of the value and the destination type of the cast. It
does this even if the cast was explicitly written. This means the user can't
write an explicit cast to silence the diagnostic.

This commit treats explicit casts involving generic types as an indication from
the programmer that the Objective-C type system is not rich enough to express
the needed invariant. On explicit casts, the checker now removes any existing
information inferred about the type arguments. Further, it no longer assumes
the casted-to specialized type because the invariant the programmer specifies
in the cast may only hold at a particular program point and not later ones. This
prevents a suppressing cast from requiring a cascade of casts down the
line.

rdar://problem/33603303

Differential Revision: https://reviews.llvm.org/D39711

llvm-svn: 318054
2017-11-13 17:35:29 +00:00
..
ARCMT
ASTMerge
Analysis [analyzer] ObjCGenerics: Don't warn on cast conversions involving explicit cast 2017-11-13 17:35:29 +00:00
CXX Fix missing -Wregister warning when 'register' is applied to a function parameter. 2017-11-01 23:38:37 +00:00
CodeCompletion Workaround reverse-iteration buildbot breakages. Filed PR35244. 2017-11-08 13:05:52 +00:00
CodeGen [ThinLTO] Handle -fdebug-pass-manager for backend invocations via clang 2017-11-13 15:38:33 +00:00
CodeGenCUDA CodeGenModule: Always output wchar_size, check LLVM assumptions. 2017-05-20 01:29:55 +00:00
CodeGenCXX CodeGenCXX: no default dllimport storage for mingw 2017-11-04 02:15:49 +00:00
CodeGenCoroutines [coroutines] Promote cleanup.dest.slot allocas to registers to avoid storing it in the coroutine frame 2017-11-11 17:00:43 +00:00
CodeGenObjC [CodeGen] Add support for IncompleteArrayType in Obj-C ivars. 2017-10-27 00:56:23 +00:00
CodeGenObjCXX Fix off-by-one error in block mangling. 2017-09-07 05:41:24 +00:00
CodeGenOpenCL CodeGen: Fix missing debug loc due to alloca 2017-10-24 19:14:43 +00:00
Coverage [Analyzer] Add support for displaying cross-file diagnostic paths in HTML output 2017-08-03 18:12:22 +00:00
CoverageMapping [Coverage] Emit deferred regions in headers 2017-11-09 02:33:40 +00:00
Driver AMDGPU: Add -mxnack/-mno-xnack options that set +/-xnack feature 2017-11-10 19:28:25 +00:00
FixIt Add a "vexing parse" warning for ambiguity between a variable declaration and a 2017-09-29 23:57:25 +00:00
Format [clang] Get rid of "%T" expansions 2017-08-15 19:47:06 +00:00
Frontend Extend -ast-dump for CXXRecordDecl to dump the flags from the DefinitionData. 2017-09-22 00:11:15 +00:00
Headers [X86] Add 3dnow and 3dnowa to the list of valid target features 2017-11-06 20:33:13 +00:00
Import Add support for remembering origins to ExternalASTMerger 2017-09-27 19:57:58 +00:00
Index [index] tag declarations should use the decl role instead of ref 2017-11-09 20:50:59 +00:00
Integration Fix the test fix from r312181 2017-08-30 23:26:38 +00:00
Layout
Lexer Driver: hoist the `wchar_t` handling to the driver 2017-10-06 23:09:55 +00:00
Misc Add -f[no-]double-square-bracket-attributes as new driver options to control use of [[]] attributes in all language modes. This is the initial implementation of WG14 N2165, which is a proposal to add [[]] attributes to C2x, but also allows you to enable these attributes in C++98, or disable them in C++11 or later. 2017-10-15 15:01:42 +00:00
Modules Update ODR hashing tests 2017-11-04 01:20:50 +00:00
OpenMP [NFC] Pacify bbot for OpenMP 'teams distribute parallel for' 2017-11-10 16:49:09 +00:00
PCH Implement C++ [basic.link]p8. 2017-09-20 07:22:00 +00:00
Parser [Parser] Fix TryParseLambdaIntroducer() error handling 2017-11-06 17:42:17 +00:00
Preprocessor [X86] Define i586 and pentium preprocessor defines for -march=lakemont to match GCC 2017-11-01 02:18:49 +00:00
Profile [Profile] Do not assign counters to functions without bodies 2017-06-30 21:02:14 +00:00
Refactor [clang-refactor] Introduce a new rename rule for qualified symbols 2017-11-08 08:56:56 +00:00
Rewriter [clang] Remove unit test which uses reverse-iterate flag 2017-08-24 22:40:32 +00:00
Sema Clarify the error message for unsupported aliases on Darwin 2017-11-07 00:31:19 +00:00
SemaCUDA [CUDA] When compilation fails, print the compilation mode. 2017-09-07 18:37:16 +00:00
SemaCXX Handle lambda captures of variable length arrays in profiling and printing. 2017-11-11 00:54:25 +00:00
SemaObjC Remove redundant copy-pasted comment in test file from r317736 2017-11-08 22:47:15 +00:00
SemaObjCXX [ObjC++] Don't warn about pessimizing move for __block variables 2017-11-07 21:40:11 +00:00
SemaOpenCL [OpenCL] Restrict swizzle length check to OpenCL mode 2017-10-17 17:54:57 +00:00
SemaTemplate [Sema] Fix an assert-on-invalid by avoiding function template specialisation 2017-10-27 18:13:31 +00:00
TableGen
Tooling [Tooling] Use FixedCompilationDatabase when `compile_flags.txt` is found. 2017-11-09 10:37:39 +00:00
Unit [test] Fix clang-test for FreeBSD and NetBSD 2017-10-24 03:11:02 +00:00
VFS
clang-rename [clang-rename] Fix and enable the failing TemplatedClassFunction test. 2017-10-25 08:25:25 +00:00
.clang-format
CMakeLists.txt Fix for skipped CMake configuration on debuginfo-tests. 2017-11-10 22:12:04 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [debuginfo-tests] Make debuginfo-tests work in a standard configuration. 2017-11-10 20:57:57 +00:00
lit.site.cfg.py.in [lit] Add host_cxx to lit config 2017-10-10 17:53:45 +00:00
make_test_dirs.pl