llvm-project/clang/test/CXX
Haojian Wu 89d9912cbf [AST] dont invaliate VarDecl when the initializer contains errors.
Summary:
This patch contains 2 separate changes:
1) the initializer of a variable should play no part in decl "invalid" bit;
2) preserve the invalid initializer via recovery exprs;

With 1), we will regress the diagnostics (one big regression is that we loose
the "selected 'begin' function with iterator type" diagnostic in for-range stmt;
but with 2) together, we don't have regressions (the new diagnostics seems to be
improved).

Reviewers: sammccall

Reviewed By: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D78116
2020-04-21 10:53:35 +02:00
..
basic [Driver] Flip the CC1 default of -fdiagnostics-show-option 2020-03-31 21:59:27 -07:00
class PR12350: Handle remaining cases permitted by CWG DR 244. 2020-02-07 18:40:41 -08:00
class.access [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
class.derived Defer checking for mismatches between the deletedness of and overriding 2020-03-12 13:07:22 -07:00
conv [Sema][C++] Propagate conversion kind to specialize the diagnostics 2020-02-25 16:05:37 +00:00
cpp PR41192: fix cases where "missing ';' after class" error would 2019-04-16 00:47:45 +00:00
dcl [Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a 2020-01-24 00:48:59 +02:00
dcl.dcl Disallow [[nodiscard]] on a function pointer declaration. 2020-04-16 09:28:49 -04:00
dcl.decl [Driver] Flip the CC1 default of -fdiagnostics-show-option 2020-03-31 21:59:27 -07:00
drs [AST] Dont invalide VarDecl even the default initializaiton is failed. 2020-04-14 12:58:48 +02:00
except [Sema][C++] Propagate conversion kind to specialize the diagnostics 2020-02-25 16:05:37 +00:00
expr [clang-tidy] modernize-use-using: Fix broken fixit with 'template' keyword 2020-04-17 10:37:24 +02:00
lex [C++20] Implement context-sensitive header-name lexing and pp-import parsing in the preprocessor. 2019-04-11 21:18:23 +00:00
module C++ DR2387: a variable template declared wtih (or instantiated with) a 2019-04-26 01:51:08 +00:00
modules-ts [c++2a] Implement semantic restrictions for 'export' declarations. 2019-04-22 22:50:11 +00:00
over [c++20] Further extend the set of comparisons broken by C++20 that we 2020-03-20 14:22:48 -07:00
special [AST] dont invaliate VarDecl when the initializer contains errors. 2020-04-21 10:53:35 +02:00
stmt.stmt [AST] dont invaliate VarDecl when the initializer contains errors. 2020-04-21 10:53:35 +02:00
temp Improve recovery from invalid template-ids. 2020-03-27 17:11:04 -07:00