File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -2063,12 +2063,9 @@ bool Compiler<Emitter>::visitCallArgs(ArrayRef<const Expr *> Args,
2063
2063
const FunctionDecl *FuncDecl,
2064
2064
bool Activate) {
2065
2065
assert (VarScope->getKind () == ScopeKind::Call);
2066
- bool HasNonNullAttr = false ;
2067
2066
llvm::BitVector NonNullArgs;
2068
- if (FuncDecl && FuncDecl->hasAttr <NonNullAttr>()) {
2069
- HasNonNullAttr = true ;
2067
+ if (FuncDecl && FuncDecl->hasAttr <NonNullAttr>())
2070
2068
NonNullArgs = collectNonNullArgs (FuncDecl, Args);
2071
- }
2072
2069
2073
2070
unsigned ArgIndex = 0 ;
2074
2071
for (const Expr *Arg : Args) {
@@ -2094,7 +2091,7 @@ bool Compiler<Emitter>::visitCallArgs(ArrayRef<const Expr *> Args,
2094
2091
return false ;
2095
2092
}
2096
2093
2097
- if (HasNonNullAttr && NonNullArgs[ArgIndex]) {
2094
+ if (!NonNullArgs. empty () && NonNullArgs[ArgIndex]) {
2098
2095
PrimType ArgT = classify (Arg).value_or (PT_Ptr);
2099
2096
if (ArgT == PT_Ptr) {
2100
2097
if (!this ->emitCheckNonNullArg (ArgT, Arg))
You can’t perform that action at this time.
0 commit comments