Skip to content

Commit ca51a2b

Browse files
committed
fixup!
Created using spr 1.3.8-beta.1
2 parents 9979bca + 37031e1 commit ca51a2b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

clang/lib/CodeGen/CGExpr.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,12 +1284,10 @@ typeContainsPointer(QualType T,
12841284
for (QualType CurrentT = T; const auto *TT = CurrentT->getAs<TypedefType>();
12851285
CurrentT = TT->getDecl()->getUnderlyingType()) {
12861286
const IdentifierInfo *II = TT->getDecl()->getIdentifier();
1287-
if (!II)
1288-
continue;
12891287
// Special Case: Syntactically uintptr_t is not a pointer; semantically,
12901288
// however, very likely used as such. Therefore, classify uintptr_t as a
12911289
// pointer, too.
1292-
if (II->isStr("uintptr_t"))
1290+
if (II && II->isStr("uintptr_t"))
12931291
return true;
12941292
}
12951293

llvm/lib/Transforms/Instrumentation/AllocToken.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ bool containsPointer(const MDNode *MD) {
158158
class ModeBase {
159159
public:
160160
explicit ModeBase(const IntegerType &TokenTy, uint64_t MaxTokens)
161-
: MaxTokens(MaxTokens ? MaxTokens : TokenTy.getBitMask()) {}
161+
: MaxTokens(MaxTokens ? MaxTokens : TokenTy.getBitMask()) {
162+
assert(MaxTokens <= TokenTy.getBitMask());
163+
}
162164

163165
protected:
164166
uint64_t boundedToken(uint64_t Val) const {

0 commit comments

Comments
 (0)