Skip to content

Commit

Permalink
[clang][Interp][NFC] Emit diagnostic for unknown builtins
Browse files Browse the repository at this point in the history
Instead of just returning false.
  • Loading branch information
tbaederr committed Mar 2, 2024
1 parent 57f599d commit a30ba2c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clang/lib/AST/Interp/InterpBuiltin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1207,6 +1207,10 @@ bool InterpretBuiltin(InterpState &S, CodePtr OpPC, const Function *F,
break;

default:
S.FFDiag(S.Current->getLocation(OpPC),
diag::note_invalid_subexpr_in_const_expr)
<< S.Current->getRange(OpPC);

return false;
}

Expand Down

0 comments on commit a30ba2c

Please sign in to comment.