[clang] a30ba2c - [clang][Interp][NFC] Emit diagnostic for unknown builtins
Timm Bäder via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 2 09:28:42 PST 2024
Author: Timm Bäder
Date: 2024-03-02T18:28:12+01:00
New Revision: a30ba2ca21b0da49631c6d0c52108e4a080a451e
URL: https://github.com/llvm/llvm-project/commit/a30ba2ca21b0da49631c6d0c52108e4a080a451e
DIFF: https://github.com/llvm/llvm-project/commit/a30ba2ca21b0da49631c6d0c52108e4a080a451e.diff
LOG: [clang][Interp][NFC] Emit diagnostic for unknown builtins
Instead of just returning false.
Added:
Modified:
clang/lib/AST/Interp/InterpBuiltin.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/Interp/InterpBuiltin.cpp b/clang/lib/AST/Interp/InterpBuiltin.cpp
index 4ba518e5f0619c..371240065179e3 100644
--- a/clang/lib/AST/Interp/InterpBuiltin.cpp
+++ b/clang/lib/AST/Interp/InterpBuiltin.cpp
@@ -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;
}
More information about the cfe-commits
mailing list