From cf4b2f6cd407dddcef35a40cc2df7e9231b6b654 Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Tue, 18 Jun 2024 15:22:20 +0200 Subject: [PATCH] ignore clang warning --- src/foreign_key.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/foreign_key.c b/src/foreign_key.c index d3092e6d33f..1f1a45190bf 100644 --- a/src/foreign_key.c +++ b/src/foreign_key.c @@ -319,6 +319,13 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid, break; } + /* + * clang will complain here about swapped arguments but this is intentional + * as this is the reverse trigger from the referenced table back to the + * referencing table. + * + * NOLINTBEGIN(readability-suspicious-call-argument) + */ CreateTrigger(fk_trigger, NULL, refRelOid, @@ -330,6 +337,7 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid, NULL, true, false); + /* NOLINTEND(readability-suspicious-call-argument) */ /* Make changes-so-far visible */ CommandCounterIncrement(); @@ -383,6 +391,13 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid, break; } + /* + * clang will complain here about swapped arguments but this is intentional + * as this is the reverse trigger from the referenced table back to the + * referencing table. + * + * NOLINTBEGIN(readability-suspicious-call-argument) + */ CreateTrigger(fk_trigger, NULL, refRelOid, @@ -394,6 +409,7 @@ createForeignKeyActionTriggers(Form_pg_constraint fk, Oid relid, Oid refRelOid, NULL, true, false); + /* NOLINTEND(readability-suspicious-call-argument) */ /* Make changes-so-far visible */ CommandCounterIncrement();