PR25890: Fix incoherent error handling in PerformImplicitConversion and
authorRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 6 Oct 2016 23:12:58 +0000 (23:12 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Thu, 6 Oct 2016 23:12:58 +0000 (23:12 +0000)
commite15a370084f376be480072c06ebd94bbeac6663c
tree5a79c7727030f2d2a616bf9e0f3b25d62ca2fe10
parent9675de5ba826f4af74a6704fc0fe2c83262d5e4a
PR25890: Fix incoherent error handling in PerformImplicitConversion and
CheckSingleAssignmentConstraints. These no longer produce ExprError() when they
have not emitted an error, and reliably inform the caller when they *have*
emitted an error.

This fixes some serious issues where we would fail to emit any diagnostic for
invalid code and then attempt to emit code for an invalid AST, and conversely
some issues where we would emit two diagnostics for the same problem.

llvm-svn: 283508
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaExpr.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaOverload.cpp
clang/lib/Sema/SemaPseudoObject.cpp
clang/lib/Sema/SemaStmt.cpp
clang/test/CXX/drs/dr0xx.cpp
clang/test/CXX/except/except.spec/p5-pointers.cpp
clang/test/SemaCXX/ambig-user-defined-conversions.cpp
clang/test/SemaCXX/derived-to-base-ambig.cpp