llvm-project/clang/lib
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
..
ARCMigrate Avoid SourceManager.h include in RawCommentList.h, add missing incs 2020-02-27 13:49:40 -08:00
AST PR45535: Check for variables with non-trivial destruction when 2020-04-20 21:23:35 -07:00
ASTMatchers [ASTMatchers] Fix isDerivedFrom for recursive templates 2020-04-15 12:49:01 -07:00
Analysis Move BinaryOperators.FPOptions to trailing storage 2020-04-15 12:57:31 -07:00
Basic When making modules transitively visible, don't take into account 2020-04-17 22:49:58 -07:00
CodeGen [Local] Update getOrEnforceKnownAlignment/getKnownAlignment to use Align/MaybeAlign. 2020-04-20 21:31:44 -07:00
CrossTU [clang] Replace SmallStr.str().str() with std::string conversion operator. 2020-01-29 21:27:46 -08:00
DirectoryWatcher Add missing newlines at EOF; NFC 2020-02-12 15:57:25 +00:00
Driver Change deprecated -fsanitize-recover flag to apply to all sanitizers, not just UBSan. 2020-04-17 22:37:30 -07:00
Edit [C++2a] Add __builtin_bit_cast, used to implement std::bit_cast 2019-07-02 18:28:13 +00:00
Format [clang-format] Do not interpret C# deconstruction in a foreach as a cast 2020-04-16 14:22:34 +01:00
Frontend Rename IsMissingRequirement to IsUnimportable and set it for shadowed 2020-04-17 22:48:56 -07:00
FrontendTool [llvm][clang][IFS] Enhancing the llvm-ifs yaml format for symbol lists. 2020-04-01 10:49:06 -04:00
Headers [CUDA] Define __CUDACC__ before standard library headers 2020-04-17 12:56:13 -07:00
Index Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
Lex [Preamble] Allow recursive inclusion of header-guarded mainfile. 2020-04-20 17:28:42 +02:00
Parse Reland Implement _ExtInt as an extended int type specifier. 2020-04-17 10:45:48 -07:00
Rewrite [Rewrite][NFC] Add FIXMEs and tests for RemoveLineIfEmpty bug 2019-08-15 21:17:48 +00:00
Sema [AST] dont invaliate VarDecl when the initializer contains errors. 2020-04-21 10:53:35 +02:00
Serialization When making modules transitively visible, don't take into account 2020-04-17 22:49:58 -07:00
StaticAnalyzer [analyzer] GenericTaint: Don't expect CallEvent to always have a Decl. 2020-04-20 15:31:43 +03:00
Tooling [ADT/STLExtras.h] - Add llvm::is_sorted wrapper and update callers. 2020-04-14 14:11:02 +03:00
CMakeLists.txt Reland [clang] DirectoryWatcher 2019-07-12 20:34:10 +00:00