[clang] Add support for builtin_verbose_trap (PR #79230)
Adrian Prantl via cfe-commits
cfe-commits at lists.llvm.org
Thu May 2 13:38:01 PDT 2024
================
@@ -172,6 +172,27 @@ static bool checkArgCount(Sema &S, CallExpr *Call, unsigned DesiredArgCount) {
<< /*is non object*/ 0 << Call->getArg(1)->getSourceRange();
}
+static bool checkBuiltinVerboseTrap(CallExpr *Call, Sema &S) {
+ bool HasError = false;
+
+ for (int I = 0; I < Call->getNumArgs(); ++I) {
+ Expr *Arg = Call->getArg(I);
+
+ if (Arg->isValueDependent())
+ continue;
+
+ // FIXME: Add more checks and reject strings that can't be handled by
+ // debuggers.
----------------
adrian-prantl wrote:
I don't think we need this FIXME. A debug info producer can't know what can and cannot be handled by debuggers, and DWARF consumers need to support any string in the specified encoding (usually UTF-8) anyway.
https://github.com/llvm/llvm-project/pull/79230
More information about the cfe-commits
mailing list