aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Sema/Sema.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-01-27 00:58:17 +0000
committerDouglas Gregor <dgregor@apple.com>2011-01-27 00:58:17 +0000
commit14d0aee957f11b9613fa4312919bec3cc5456a1c (patch)
treeb54c89ea196f1db30a542516edcf1f51543ab982 /include/clang/Sema/Sema.h
parent52a80e19ad688091723a52ad53337767bb0ac684 (diff)
Fix a horrible bug in our handling of C-style casting, where a C-style
derived-to-base cast that also casts away constness (one of the cases for static_cast followed by const_cast) would be treated as a bit-cast rather than a derived-to-base class, causing miscompiles and heartburn. Fixes <rdar://problem/8913298>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124340 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/Sema.h')
-rw-r--r--include/clang/Sema/Sema.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h
index 7d51fc34bc..5db08ba830 100644
--- a/include/clang/Sema/Sema.h
+++ b/include/clang/Sema/Sema.h
@@ -999,7 +999,8 @@ public:
Expr *From,
bool SuppressUserConversions,
bool AllowExplicit,
- bool InOverloadResolution);
+ bool InOverloadResolution,
+ bool CStyle);
bool IsIntegralPromotion(Expr *From, QualType FromType, QualType ToType);
bool IsFloatingPointPromotion(QualType FromType, QualType ToType);
@@ -1023,7 +1024,8 @@ public:
CastKind &Kind,
CXXCastPath &BasePath,
bool IgnoreBaseAccess);
- bool IsQualificationConversion(QualType FromType, QualType ToType);
+ bool IsQualificationConversion(QualType FromType, QualType ToType,
+ bool CStyle);
bool DiagnoseMultipleUserDefinedConversion(Expr *From, QualType ToType);
@@ -4559,10 +4561,11 @@ public:
bool PerformImplicitConversion(Expr *&From, QualType ToType,
const ImplicitConversionSequence& ICS,
AssignmentAction Action,
- bool IgnoreBaseAccess = false);
+ bool CStyle = false);
bool PerformImplicitConversion(Expr *&From, QualType ToType,
const StandardConversionSequence& SCS,
- AssignmentAction Action,bool IgnoreBaseAccess);
+ AssignmentAction Action,
+ bool CStyle);
/// the following "Check" methods will return a valid/converted QualType
/// or a null QualType (indicating an error diagnostic was issued).