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,
20632063 const FunctionDecl *FuncDecl,
20642064 bool Activate) {
20652065 assert (VarScope->getKind () == ScopeKind::Call);
2066- bool HasNonNullAttr = false ;
20672066 llvm::BitVector NonNullArgs;
2068- if (FuncDecl && FuncDecl->hasAttr <NonNullAttr>()) {
2069- HasNonNullAttr = true ;
2067+ if (FuncDecl && FuncDecl->hasAttr <NonNullAttr>())
20702068 NonNullArgs = collectNonNullArgs (FuncDecl, Args);
2071- }
20722069
20732070 unsigned ArgIndex = 0 ;
20742071 for (const Expr *Arg : Args) {
@@ -2094,7 +2091,7 @@ bool Compiler<Emitter>::visitCallArgs(ArrayRef<const Expr *> Args,
20942091 return false ;
20952092 }
20962093
2097- if (HasNonNullAttr && NonNullArgs[ArgIndex]) {
2094+ if (!NonNullArgs. empty () && NonNullArgs[ArgIndex]) {
20982095 PrimType ArgT = classify (Arg).value_or (PT_Ptr);
20992096 if (ArgT == PT_Ptr) {
21002097 if (!this ->emitCheckNonNullArg (ArgT, Arg))
You can’t perform that action at this time.
0 commit comments