Skip to content

Commit a8e79ce

Browse files
committed
Claim matched arguments
1 parent b82e48d commit a8e79ce

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clang/lib/Driver/SanitizerArgs.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,11 @@ parseNoSanitizeHotArgs(const Driver &D, const llvm::opt::ArgList &Args,
335335
bool DiagnoseErrors) {
336336
SanitizerMaskCutoffs Cutoffs;
337337
for (const auto *Arg : Args)
338-
if (Arg->getOption().matches(options::OPT_fno_sanitize_top_hot_EQ))
338+
if (Arg->getOption().matches(options::OPT_fno_sanitize_top_hot_EQ)) {
339+
Arg->claim();
339340
parseArgCutoffs(D, Arg, DiagnoseErrors, Cutoffs);
341+
}
342+
340343
return Cutoffs;
341344
}
342345

0 commit comments

Comments
 (0)