summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaChecking.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2013-05-06 21:39:12 +0000
committerJohn McCall <rjmccall@apple.com>2013-05-06 21:39:12 +0000
commitd25db7ed0f8ec288a770a75b88caaa688ac22079 (patch)
treed8c43fb8b78535ecf9afca1a38c1eb1a7b68c401 /clang/lib/Sema/SemaChecking.cpp
parent252a0acce2b38dbf23e4e4df47b251cfa2af39aa (diff)
downloadbcm5719-llvm-d25db7ed0f8ec288a770a75b88caaa688ac22079.tar.gz
bcm5719-llvm-d25db7ed0f8ec288a770a75b88caaa688ac22079.zip
Grab-bag of bit-field fixes:
- References to ObjC bit-field ivars are bit-field lvalues; fixes rdar://13794269, which got me started down this. - Introduce Expr::refersToBitField, switch a couple users to it where semantically important, and comment the difference between this and the existing API. - Discourage Expr::getBitField by making it a bit longer and less general-sounding. - Lock down on const_casts of bit-field gl-values until we hear back from the committee as to whether they're allowed. llvm-svn: 181252
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
-rw-r--r--clang/lib/Sema/SemaChecking.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index e14635ee25d..a0998a46c66 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -4311,7 +4311,7 @@ static IntRange GetExprRange(ASTContext &C, Expr *E, unsigned MaxWidth) {
IntRange::forValueOfType(C, E->getType());
}
- if (FieldDecl *BitField = E->getBitField())
+ if (FieldDecl *BitField = E->getSourceBitField())
return IntRange(BitField->getBitWidthValue(C),
BitField->getType()->isUnsignedIntegerOrEnumerationType());
@@ -4688,7 +4688,7 @@ static void AnalyzeAssignment(Sema &S, BinaryOperator *E) {
// We want to recurse on the RHS as normal unless we're assigning to
// a bitfield.
- if (FieldDecl *Bitfield = E->getLHS()->getBitField()) {
+ if (FieldDecl *Bitfield = E->getLHS()->getSourceBitField()) {
if (AnalyzeBitFieldAssignment(S, Bitfield, E->getRHS(),
E->getOperatorLoc())) {
// Recurse, ignoring any implicit conversions on the RHS.
OpenPOWER on IntegriCloud