llvm-project/clang/test
Haojian Wu 9657385960 [AST] Dont invalide VarDecl even the default initializaiton is failed.
Summary:
This patch would cause clang emit more diagnostics, but it is much better than https://reviews.llvm.org/D76831

```cpp
struct A {
  A(int);
  ~A() = delete;
};
void k() {
  A a;
}

```

before the patch:

/tmp/t3.cpp:24:5: error: no matching constructor for initialization of 'A'
  A a;
    ^
/tmp/t3.cpp:20:3: note: candidate constructor not viable: requires 1 argument, but 0 were provided
  A(int);
  ^
/tmp/t3.cpp:19:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
struct A {

After the patch:

/tmp/t3.cpp:24:5: error: no matching constructor for initialization of 'A'
  A a;
    ^
/tmp/t3.cpp:20:3: note: candidate constructor not viable: requires 1 argument, but 0 were provided
  A(int);
  ^
/tmp/t3.cpp:19:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
struct A {
       ^
/tmp/t3.cpp:24:5: error: attempt to use a deleted function
  A a;
    ^
/tmp/t3.cpp:21:3: note: '~A' has been explicitly marked deleted here
  ~A() = delete;

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D77395
2020-04-14 12:58:48 +02:00
..
ARCMT
AST [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
ASTMerge
Analysis [Analyzer][StreamChecker] Added evaluation of fseek. 2020-04-14 12:35:28 +02:00
CXX [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
ClangScanDeps [clang][clang-scan-deps] Aggregate the full dependency information. 2020-01-23 16:58:50 -08:00
CodeCompletion [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
CodeGen [AVR] Support aliases in non-zero address space 2020-04-14 00:42:19 +02:00
CodeGenCUDA Speed up deferred diagnostic emitter 2020-04-06 13:07:43 -04:00
CodeGenCXX [MS] Mark vbase dtors used when marking dtor used 2020-04-09 14:19:36 -07:00
CodeGenCoroutines [CodeGen] Add an alignment attribute to all sret parameters 2020-03-24 15:31:57 -04:00
CodeGenHIP Don't dump IR output from this test to stdout. 2020-01-16 19:19:45 -08:00
CodeGenObjC [CodeGenObjC] Fix a crash when attempting to copy a zero-sized bit-field in a non-trivial C struct 2020-04-06 16:04:13 -04:00
CodeGenObjCXX [CodeGen] Add an alignment attribute to all sret parameters 2020-03-24 15:31:57 -04:00
CodeGenOpenCL AMDGPU: Teach toolchain to link rocm device libs 2020-04-10 13:37:32 -04:00
CodeGenOpenCLCXX [CodeGen] Add an alignment attribute to all sret parameters 2020-03-24 15:31:57 -04:00
CodeGenSYCL [SYCL] Implement __builtin_unique_stable_name. 2020-03-25 07:01:50 -07:00
Coverage
CoverageMapping Reland: [Coverage] Revise format to reduce binary size 2020-02-28 18:12:04 -08:00
Driver HIP: Fix handling of denormal mode 2020-04-13 11:48:45 -07:00
FixIt [objc_direct] Small updates to help with adoption. 2020-02-16 16:32:41 -08:00
Format
Frontend [Fixed Point] Add triples to test cases. 2020-04-08 16:31:36 +02:00
Headers [OpenMP] Allow <math.h> to go first in C++-mode in target regions 2020-04-09 22:10:31 -05:00
Import [CodeGen] Emit destructor calls to destruct compound literals 2020-03-10 14:08:28 -07:00
Index [pch] Honour -fallow-pch-with-compiler-errors for overall compilation status 2020-03-31 13:50:12 -07:00
Integration
InterfaceStubs [llvm][clang][IFS] Enhancing the llvm-ifs yaml format for symbol lists. 2020-04-01 10:49:06 -04:00
Layout
Lexer Add -std=c++20 flag, replace C++2a with C++20 throughout the Clang 2020-02-18 16:16:37 -08:00
Misc [hip] Remove `hip_pinned_shadow`. 2020-04-07 09:51:49 -04:00
Modules Slightly modify some tests as follow up to bcf66084, which breaks tests. 2020-04-07 09:25:16 -07:00
OpenMP [OPENMP]Fix the test to pacify buildbots, NFC. 2020-04-09 11:28:50 -04:00
PCH [clang] Persist Attr::IsPackExpansion into the PCH 2020-04-05 23:32:03 -04:00
Parser [Parser] Improve diagnostic and error recovery when C++ keywords are used as identifiers. 2020-04-08 15:15:33 +02:00
ParserSYCL [SYCL] Implement __builtin_unique_stable_name. 2020-03-25 07:01:50 -07:00
Preprocessor [RISCV] Add Clang frontend support for Bitmanip extension 2020-04-09 18:04:22 +01:00
Profile Reland: [Coverage] Revise format to reduce binary size 2020-02-28 18:12:04 -08:00
Refactor
Rewriter
Sema Allow parameter names to be elided in a function definition in C. 2020-04-07 14:43:38 -04:00
SemaCUDA [hip] Remove `hip_pinned_shadow`. 2020-04-07 09:51:49 -04:00
SemaCXX [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
SemaObjC Revert "[ObjC generics] Fix not inheriting type bounds in categories/extensions." 2020-04-07 17:41:30 -07:00
SemaObjCXX [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
SemaOpenCL [OpenCL] Add sub-group builtin functions 2020-04-02 13:18:56 +01:00
SemaOpenCLCXX Revert "[AST] Build recovery expressions by default for C++." 2020-03-26 16:25:32 +01:00
SemaSYCL [SYCL] Driver option to select SYCL version 2020-03-07 18:28:54 +03:00
SemaTemplate Fix template instantiation of a non-dependent call to an inherited 2020-04-06 19:20:30 -07:00
TableGen
Templight
Tooling [PowerPC] Delete PPCMachObjectWriter and powerpc{,64}-apple-darwin 2020-03-05 11:05:26 -08:00
Unit Revert a few unsuccessful attempts at fixing bots. 2020-04-13 17:09:21 -04:00
VFS [VFS] More consistent support for Windows 2020-02-05 11:38:20 -08:00
clang-rename [clang-rename] Fix the failure rename test. 2020-02-11 10:07:00 +01:00
utils/update_cc_test_checks Move update_cc_test_checks.py tests to clang 2020-02-14 14:39:55 +00:00
.clang-format
CMakeLists.txt Stop passing site cfg files via --param to llvm-lit. 2020-04-07 08:20:40 -04:00
TestRunner.sh
cxx-sections.data
lit.cfg.py Fix an indent. 2020-04-13 11:54:00 -04:00
lit.site.cfg.py.in Revert a few unsuccessful attempts at fixing bots. 2020-04-13 17:09:21 -04:00
make_test_dirs.pl