llvm-project/clang/test
Alexander Shaposhnikov 195b25cf3c [clang] Add getUnsignedPointerDiffType method
C11 standard refers to the unsigned counterpart of the type ptrdiff_t 
in the paragraph 7.21.6.1p7 where it defines the format specifier %tu.
In Clang (in PrintfFormatString.cpp, lines 508-510) there is a FIXME for this case,
in particular, Clang didn't diagnose %tu issues at all, i.e.
it didn't emit any warnings on the code printf("%tu", 3.14).
In this diff we add a method getUnsignedPointerDiffType for getting the corresponding type
similarly to how it's already done in the other analogous cases (size_t, ssize_t, ptrdiff_t etc)
and fix -Wformat diagnostics for %tu plus the emitted fix-it as well.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D38270

llvm-svn: 314470
2017-09-28 23:11:31 +00:00
..
ARCMT clang/test/ARCMT/remap-applying.c: Use %/s on the command line of echo(1). 2017-04-28 05:02:52 +00:00
ASTMerge Revert r299355 "[ASTImporter] Fix for importing unnamed structs" 2017-04-03 21:06:45 +00:00
Analysis [analyzer] Fix an outdated comment in a test. NFC. 2017-09-27 10:59:06 +00:00
CXX Don't warn about runtime behavior problems in variable initializers that we 2017-09-23 18:27:11 +00:00
CodeCompletion Fixed a crash in code completion. 2017-09-08 13:36:38 +00:00
CodeGen revert rL314300 2017-09-27 13:02:44 +00:00
CodeGenCUDA CodeGenModule: Always output wchar_size, check LLVM assumptions. 2017-05-20 01:29:55 +00:00
CodeGenCXX [DWARF] Allow forward declarations of a class template instantiation 2017-09-28 18:37:02 +00:00
CodeGenCoroutines [coroutines] Support coroutine-handle returning await-suspend (i.e symmetric control transfer) 2017-08-25 04:46:54 +00:00
CodeGenObjC Look through parentheses. 2017-09-28 01:31:17 +00:00
CodeGenObjCXX Fix off-by-one error in block mangling. 2017-09-07 05:41:24 +00:00
CodeGenOpenCL [OpenCL] Fixed CL version in failing test. 2017-09-27 17:03:35 +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] Add an option to emit limited coverage info 2017-09-22 18:23:04 +00:00
Driver [OpenMP] Fix passing of -m arguments to device toolchain 2017-09-27 18:12:34 +00:00
FixIt [clang] Add getUnsignedPointerDiffType method 2017-09-28 23:11:31 +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 This adds the _Float16 preprocessor macro definitions. 2017-09-13 15:23:19 +00:00
Import Add support for remembering origins to ExternalASTMerger 2017-09-27 19:57:58 +00:00
Index Set completion priority of destructors and operators to CCP_Unlikely. 2017-09-22 19:07:37 +00:00
Integration Fix the test fix from r312181 2017-08-30 23:26:38 +00:00
Layout Print nested name specifiers for typedefs and type aliases 2017-03-10 15:04:58 +00:00
Lexer Recommit "Add _Float16 as a C/C++ source language type" 2017-09-08 15:15:00 +00:00
Misc Fix test change missed in r314456 2017-09-28 20:23:43 +00:00
Modules Extend -ast-dump for CXXRecordDecl to dump the flags from the DefinitionData. 2017-09-22 00:11:15 +00:00
OpenMP [OpenMP] Add an additional test for D34888 2017-09-27 14:31:08 +00:00
PCH Implement C++ [basic.link]p8. 2017-09-20 07:22:00 +00:00
Parser Properly parse a postfix expression following a Boolean literal. Fixes PR34273. 2017-09-28 21:29:18 +00:00
Preprocessor [Preprocessor] Preserve #pragma clang assume_nonnull in preprocessed output 2017-09-27 23:29:37 +00:00
Profile [Profile] Do not assign counters to functions without bodies 2017-06-30 21:02:14 +00:00
Refactor Fix Refactor/tool-test-support.c test on Windows by avoiding 2017-09-14 15:10:39 +00:00
Rewriter [clang] Remove unit test which uses reverse-iterate flag 2017-08-24 22:40:32 +00:00
Sema [clang] Add getUnsignedPointerDiffType method 2017-09-28 23:11:31 +00:00
SemaCUDA [CUDA] When compilation fails, print the compilation mode. 2017-09-07 18:37:16 +00:00
SemaCXX [Sema] Correct nothrow inherited by noexcept 2017-09-28 20:47:10 +00:00
SemaObjC [Sema][ObjC] Warn about mismatches in attributes between overriding and 2017-09-20 05:39:18 +00:00
SemaObjCXX Add test cases that weren't committed in r313945. 2017-09-22 01:54:36 +00:00
SemaOpenCL [OpenCL] Handle taking an address of block captures. 2017-09-07 17:00:33 +00:00
SemaTemplate Don't warn about runtime behavior problems in variable initializers that we 2017-09-23 18:27:11 +00:00
TableGen
Tooling [clang-diff] Treat CXXCtorInitializer as a node 2017-08-27 22:52:20 +00:00
Unit [lit] Rename lld and clang lit configs to end in .py 2017-09-21 17:38:13 +00:00
VFS
clang-rename [refactor] add clang-refactor tool with initial testing support and 2017-09-14 10:06:52 +00:00
.clang-format
CMakeLists.txt [test] Enable clang-func-mapping as a test dep with the analyzer 2017-09-22 22:17:10 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [lit.cfg] Avoid concatenating which(clang-func-mapping) if it's missing 2017-09-22 18:42:28 +00:00
lit.site.cfg.py.in [lit] Rename lld and clang lit configs to end in .py 2017-09-21 17:38:13 +00:00
make_test_dirs.pl