llvm-project/clang/test
Henry Wong f717d4795a [analyzer] Unroll the loop when it has a unsigned counter.
Summary:
The original implementation in the `LoopUnrolling.cpp` didn't consider the case where the counter is unsigned. This case is only handled in `simpleCondition()`, but this is not enough, we also need to deal with the unsinged counter with the counter initialization.

Since `IntegerLiteral` is `signed`, there is a `ImplicitCastExpr<IntegralCast>` in `unsigned counter = IntergerLiteral`. This patch add the `ignoringParenImpCasts()` in the `IntegerLiteral` matcher.

Reviewers: szepet, a.sidorin, NoQ, george.karpenkov

Reviewed By: szepet, george.karpenkov

Subscribers: xazax.hun, rnkovacs, cfe-commits, MTC

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

llvm-svn: 328919
2018-03-31 12:46:46 +00:00
..
ARCMT [ObjC] Allow declaring __strong pointer fields in structs in Objective-C 2018-02-28 07:15:55 +00:00
ASTMerge [ASTImporter] Fix lexical DC for templated decls; support VarTemplatePartialSpecDecl 2018-02-14 11:18:00 +00:00
Analysis [analyzer] Unroll the loop when it has a unsigned counter. 2018-03-31 12:46:46 +00:00
CXX [C++17] Fix class template argument deduction for default constructors without an initializer 2018-03-24 04:32:11 +00:00
CodeCompletion [SemaOverload] Fixed crash on code completion 2018-03-09 14:43:29 +00:00
CodeGen Set dso_local on cfi_slowpath. 2018-03-29 22:08:01 +00:00
CodeGenCUDA Set calling convention for CUDA kernel 2018-03-29 15:02:08 +00:00
CodeGenCXX Set dso_local when clearing dllimport. 2018-03-29 16:45:18 +00:00
CodeGenCoroutines [MS] Don't escape MS C++ names with \01 2018-03-16 20:36:49 +00:00
CodeGenObjC Generalize NRVO to cover C structs. 2018-03-29 17:56:24 +00:00
CodeGenObjCXX [ObjC++] Make parameter passing and function return compatible with ObjC 2018-03-28 21:13:14 +00:00
CodeGenOpenCL AMDGPU: Update datalayout for stack alignment 2018-03-27 19:26:51 +00:00
Coverage
CoverageMapping [Coverage] Handle break/continue outside of loop bodies 2018-02-16 07:59:43 +00:00
Driver Remove unused CHECK lines leftover from r306928. 2018-03-30 18:39:28 +00:00
FixIt [Parser][FixIt] Better diagnostics for "typedef" instead of "typename" typo 2018-02-08 14:37:58 +00:00
Format [clang-format] Fix bug where -dump-config failed on ObjC header 2018-01-29 17:36:43 +00:00
Frontend [Attr] Merge two dependent tests from different directories 2018-03-13 22:18:29 +00:00
Headers In stdbool.h, define bool, false, true only in gnu++98 2017-12-08 08:28:08 +00:00
Import [ASTImporter] Support LambdaExprs and improve template support 2018-01-26 11:36:54 +00:00
Index [vfs] Don't bail out after a missing -ivfsoverlay file 2018-03-23 17:37:27 +00:00
Integration
Layout
Lexer [ObjC] Allow declaring __strong pointer fields in structs in Objective-C 2018-02-28 07:15:55 +00:00
Misc Adding nocf_check attribute for cf-protection fine tuning 2018-03-17 13:31:35 +00:00
Modules [Modules] Improve fixit for framework private module maps 2018-03-30 05:17:58 +00:00
OpenMP [OPENMP] Added emission of offloading data sections for declare target 2018-03-30 18:31:07 +00:00
PCH [MS] Fix late-parsed template infinite loop in eager instantiation 2018-03-26 18:22:47 +00:00
Parser [C++17] Fix class template argument deduction for default constructors without an initializer 2018-03-24 04:32:11 +00:00
Preprocessor Fix some handling of AST nodes with diagnostics. 2018-03-28 04:16:13 +00:00
Profile [PGO] Detect more structural changes with the stable hash 2017-11-14 23:56:53 +00:00
Refactor [refactor][extract] avoid extracting expressions from types in functions 2017-11-14 18:59:01 +00:00
Rewriter
Sema [Diag] Avoid emitting a redefinition note if no location is available. 2018-03-28 16:05:05 +00:00
SemaCUDA Fix some handling of AST nodes with diagnostics. 2018-03-28 04:16:13 +00:00
SemaCXX Fix some handling of AST nodes with diagnostics. 2018-03-28 04:16:13 +00:00
SemaObjC [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. 2018-03-29 17:34:09 +00:00
SemaObjCXX Add support for attribute 'trivial_abi'. 2018-02-05 20:23:22 +00:00
SemaOpenCL [OpenCL] Add "cles_khr_int64" extension. 2018-01-26 11:48:46 +00:00
SemaTemplate Fix some handling of AST nodes with diagnostics. 2018-03-28 04:16:13 +00:00
TableGen TableGen: Give up on exact fixits for diagnostic groups 2018-03-06 17:55:00 +00:00
Templight [Templight] Template Instantiation Observer 2018-02-10 14:04:45 +00:00
Tooling Fix test clang-diff-json.cpp 2018-02-10 21:28:55 +00:00
Unit [lit] Set shlibpath_var on Solaris 2017-11-27 13:33:19 +00:00
VFS [vfs] Don't bail out after a missing -ivfsoverlay file 2018-03-23 17:37:27 +00:00
clang-rename [clang-rename] Fix and enable the failing TemplatedClassFunction test. 2017-10-25 08:25:25 +00:00
.clang-format
CMakeLists.txt [ThinLTO/CFI] Include TYPE_ID summaries into GLOBALVAL_SUMMARY_BLOCK 2018-02-14 22:41:15 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [debuginfo] Remove temporary FIXME. 2017-12-14 22:12:46 +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