[clang] Add support for builtin_verbose_trap (PR #79230)

Dan Liew via cfe-commits cfe-commits at lists.llvm.org
Fri May 10 10:49: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) {
----------------
delcypher wrote:

@ahatanak Now that we've changed the interface I think this Sema check should be slightly different.

* We should be checking that the number of arguments is **exactly** 2. This looks like it allows any number.
* The `Category` argument should not be allowed to contain the separator character (`$`).

https://github.com/llvm/llvm-project/pull/79230


More information about the cfe-commits mailing list