Allow explicit ctors for casts.

llvm-svn: 80374
This commit is contained in:
Anders Carlsson 2009-08-28 16:22:20 +00:00
parent 8d799c5144
commit f2bc7c386e
2 changed files with 7 additions and 1 deletions

View File

@ -784,7 +784,7 @@ TryStaticImplicitCast(Sema &Self, Expr *SrcExpr, QualType DestType,
ImplicitConversionSequence ICS =
Self.TryImplicitConversion(SrcExpr, DestType,
/*SuppressUserConversions=*/false,
/*AllowExplicit=*/false,
/*AllowExplicit=*/true,
/*ForceRValue=*/false,
/*InOverloadResolution=*/false);

View File

@ -0,0 +1,6 @@
// RUN: clang-cc -fsyntax-only -verify %s
struct B { B(bool); };
void f() {
(void)(B)true;
(void)B(true);
}