diff options
author | Jeffrey Yasskin <jyasskin@google.com> | 2011-08-12 20:56:43 +0000 |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@google.com> | 2011-08-12 20:56:43 +0000 |
commit | 94f8c779314c50601c5dc66ded879515798b8bf1 (patch) | |
tree | 036d451c07ddc86f0c664a94edbbe0a50a36f020 /clang/lib/Sema/SemaInit.cpp | |
parent | a52aa3c18fa65ed65abbd0ea0f91684da2eae210 (diff) | |
download | bcm5719-llvm-94f8c779314c50601c5dc66ded879515798b8bf1.tar.gz bcm5719-llvm-94f8c779314c50601c5dc66ded879515798b8bf1.zip |
Conversions to bool count as integer conversions for the purposes of
the C++0x narrowing error.
llvm-svn: 137512
Diffstat (limited to 'clang/lib/Sema/SemaInit.cpp')
-rw-r--r-- | clang/lib/Sema/SemaInit.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaInit.cpp b/clang/lib/Sema/SemaInit.cpp index c406ad98405..e410f2f9a0d 100644 --- a/clang/lib/Sema/SemaInit.cpp +++ b/clang/lib/Sema/SemaInit.cpp @@ -2321,6 +2321,7 @@ bool InitializationSequence::endsWithNarrowing(ASTContext &Ctx, // the source is a constant expression and the actual value after // conversion will fit into the target type and will produce the original // value when converted back to the original type. + case ICK_Boolean_Conversion: // Bools are integers too. case ICK_Integral_Conversion: { assert(FromType->isIntegralOrUnscopedEnumerationType()); assert(ToType->isIntegralOrUnscopedEnumerationType()); |