SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. [AST] Preserve the type in RecoveryExprs for broken function calls. (details)
Commit 8222107aa9249aada81334c922a2d284042242ed by hokein.wu
[AST] Preserve the type in RecoveryExprs for broken function calls.

RecoveryExprs are modeled as dependent type to prevent bogus diagnostics
and crashes in clang.

This patch allows to preseve the type for broken calls when the
RecoveryEprs have a known type, e.g. a broken non-overloaded call, a
overloaded call when the all candidates have the same return type, so
that more features (code completion still work on "take2args(x).^") still
work.

However, adding the type is risky, which may result in more clang code being
affected leading to new crashes and hurt diagnostic, and it requires large
effort to minimize the affect (update all sites in clang to handle errorDepend
case), so we add a new flag (off by default) to allow us to develop/test
them incrementally.

This patch also has some trivial fixes to suppress diagnostics (to prevent regressions).

Tested:

all existing tests are passed (when both "-frecovery-ast", "-frecovery-ast-type" flags are flipped on);

Reviewed By: sammccall

Subscribers: rsmith, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D79160
The file was modifiedclang/test/CodeCompletion/member-access.cpp
The file was modifiedclang/include/clang/Basic/LangOptions.def
The file was modifiedclang/lib/AST/ComputeDependence.cpp
The file was modifiedclang/test/AST/ast-dump-recovery.cpp
The file was modifiedclang/test/Index/getcursor-recovery.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was modifiedclang/lib/Sema/SemaOverload.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/AST/Expr.cpp
The file was modifiedclang/include/clang/AST/Expr.h
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/include/clang/Driver/CC1Options.td
The file was modifiedclang/lib/Sema/SemaExpr.cpp