projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0e5d2f
)
Fix a compilation warning with gcc 4.6
author
Eli Bendersky
<eliben@google.com>
Tue, 18 Dec 2012 18:53:14 +0000
(18:53 +0000)
committer
Eli Bendersky
<eliben@google.com>
Tue, 18 Dec 2012 18:53:14 +0000
(18:53 +0000)
llvm-svn: 170440
clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
patch
|
blob
|
history
diff --git
a/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
b/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
index
43088b4
..
90c3387
100644
(file)
--- a/
clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
+++ b/
clang/lib/CodeGen/CGRecordLayoutBuilder.cpp
@@
-1088,7
+1088,7
@@
CGRecordLayout *CodeGenTypes::ComputeRecordLayout(const RecordDecl *D,
"Storage size does not match the element type size");
}
assert(Info.Size > 0 && "Empty bitfield!");
- assert(
Info.Offset
+ Info.Size <= Info.StorageSize &&
+ assert(
static_cast<unsigned>(Info.Offset)
+ Info.Size <= Info.StorageSize &&
"Bitfield outside of its allocated storage");
}
#endif