llvm-project/clang/test
Eric Fiselier 73b51ae160 Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides.
Summary:
Some style guides want to allow using CTAD only on types that "opt-in"; i.e. on types that are designed to support it and not just types that *happen* to work with it.

This patch implements the `-Wctad-maybe-unsupported` warning, which is off by default, which warns when CTAD is used on a type that does not define any deduction guides.

The following pattern can be used to suppress the warning in cases where the type intentionally doesn't define any deduction guides:

```
struct allow_ctad_t;

template <class T>
struct TestSuppression {
  TestSuppression(T) {}
};
TestSuppression(allow_ctad_t)->TestSuppression<void>; // guides with incomplete parameter types are never considered.
```

Reviewers: rsmith, james.dennett, gromer

Reviewed By: rsmith

Subscribers: jdennett, Quuxplusone, lebedev.ri, cfe-commits

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

llvm-svn: 351484
2019-01-17 21:44:24 +00:00
..
ARCMT
AST Added test cases for dumping variadic-like functions; NFC. 2019-01-16 16:12:30 +00:00
ASTMerge
Analysis [analyzer] Another RetainCountChecker cleanup 2019-01-16 23:21:38 +00:00
CXX PR40329: [adl] Fix determination of associated classes when searching a 2019-01-16 22:01:39 +00:00
CodeCompletion Refactor the way we handle diagnosing unused expression results. 2019-01-04 16:58:14 +00:00
CodeGen CodeGen: Cast llvm.flt.rounds result to match __builtin_flt_rounds 2019-01-17 15:21:55 +00:00
CodeGenCUDA [CUDA] Treat extern global variable shadows same as regular extern vars. 2018-12-22 01:11:09 +00:00
CodeGenCXX TLS: Respect visibility for thread_local variables on Darwin (PR40327) 2019-01-17 17:53:45 +00:00
CodeGenCoroutines Revert "[CodeGenCXX] Treat 'this' as noalias in constructors" 2018-10-15 15:43:00 +00:00
CodeGenObjC [CodeGenObjC] Use a constant value for non-fragile ivar offsets when possible 2019-01-17 18:18:53 +00:00
CodeGenObjCXX [CodeGen] Replace '@' characters in block descriptors' symbol names with 2018-12-29 17:28:30 +00:00
CodeGenOpenCL [AMDGPU] Separate feature dot-insts 2019-01-10 03:25:47 +00:00
CodeGenOpenCLCXX [OpenCL] Set generic addr space of 'this' in special class members. 2019-01-14 11:44:22 +00:00
Coverage [Frontend] Delete -print-decl-contexts 2018-10-03 03:50:44 +00:00
CoverageMapping [Coverage] Specify the Itanium ABI triple for a C++ test 2018-11-28 20:51:09 +00:00
Driver [MSP430] Fix msp430-toolchain.c on Windows (added in r351228) 2019-01-16 13:28:30 +00:00
FixIt Introduce the _Clang scoped attribute token. 2018-11-09 17:19:45 +00:00
Format
Frontend [Fixed Point Arithmetic] Fixed Point Subtraction 2019-01-16 19:53:50 +00:00
Headers Recommit r351160 "[X86] Make _xgetbv/_xsetbv on non-windows platforms" 2019-01-16 22:56:25 +00:00
Import [AST] Store "UsesADL" information in CallExpr. 2018-12-12 21:50:55 +00:00
Index [libclang] Fix clang_Cursor_isAnonymous 2019-01-10 09:34:44 +00:00
Integration
Layout
Lexer Implementation Feature Test Macros for P0722R3 2019-01-11 17:09:22 +00:00
Misc [Nios2] Remove Nios2 backend 2019-01-15 19:58:36 +00:00
Modules CodeGen: fix autolink emission on ELF 2019-01-05 19:27:12 +00:00
OpenMP [OpenMP] Avoid remainder operations for loop index values on a collapsed loop nest. 2019-01-09 20:45:26 +00:00
PCH Reuse code from CGDebugInfo::getOrCreateFile() when creating the file 2018-12-11 16:58:43 +00:00
Parser Add two new pragmas for controlling software pipelining optimizations. 2019-01-04 17:20:00 +00:00
Preprocessor [MSVC Compat] Fix typo correction for inclusion directives. 2019-01-15 20:08:23 +00:00
Profile
Refactor
Rewriter
Sema [MSP430] Improve support of 'interrupt' attribute 2019-01-16 13:44:01 +00:00
SemaCUDA [CUDA][HIP] Fix ShouldDeleteSpecialMember for inherited constructors 2018-10-09 15:53:14 +00:00
SemaCXX Add -Wctad-maybe-unsupported to diagnose CTAD on types with no user defined deduction guides. 2019-01-17 21:44:24 +00:00
SemaObjC [ObjC] Follow-up r350768 and allow the use of unavailable methods that are 2019-01-17 18:12:45 +00:00
SemaObjCXX Distinguish `__block` variables that are captured by escaping blocks 2018-10-01 21:51:28 +00:00
SemaOpenCL OpenCL: Improve vector printf warnings 2018-12-01 22:16:27 +00:00
SemaOpenCLCXX [OpenCL] Set generic addr space of 'this' in special class members. 2019-01-14 11:44:22 +00:00
SemaTemplate Remember to instantiate explicit template argument lists in a friend 2019-01-11 01:59:33 +00:00
TableGen
Templight
Tooling Fix libc++ mac driver test to pass on Windows 2019-01-16 22:05:34 +00:00
Unit
VFS [VFS] Implement `RedirectingFileSystem::getRealPath`. 2018-11-16 01:18:04 +00:00
clang-rename
.clang-format
CMakeLists.txt [analyzer][CrossTU][NFC] Generalize to external definitions instead of external functions 2019-01-10 17:44:04 +00:00
TestRunner.sh
cxx-sections.data
lit.cfg.py [analyzer][CrossTU][NFC] Generalize to external definitions instead of external functions 2019-01-10 17:44:04 +00:00
lit.site.cfg.py.in
make_test_dirs.pl