From 3aa3c5f28ce2f0c6a14186d00d4ae43cf43f1552 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Tr=C3=A1vn=C3=AD=C4=8Dek?= <jan.travnicek@fit.cvut.cz>
Date: Fri, 26 Nov 2021 20:04:41 +0100
Subject: [PATCH] tidy: don't report suspicious code in test of undefined
 behavior

---
 tests/testing/algorithms/UndefinedBehaviour.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/testing/algorithms/UndefinedBehaviour.cpp b/tests/testing/algorithms/UndefinedBehaviour.cpp
index 145995ab1b..f3190e7f6a 100644
--- a/tests/testing/algorithms/UndefinedBehaviour.cpp
+++ b/tests/testing/algorithms/UndefinedBehaviour.cpp
@@ -9,7 +9,7 @@ namespace debug {
 
 int UndefinedBehaviour::undefined_behaviour ( ) {
 	int a = 5; // NOLINT(readability-magic-numbers) // just some random number
-	int * b = reinterpret_cast < int * > ( reinterpret_cast < size_t > ( & a ) + 1 );
+	int * b = reinterpret_cast < int * > ( reinterpret_cast < size_t > ( & a ) + 1 ); //NOLINT(performance-no-int-to-ptr) // well we just test undefined behavior detection
 
 	return * b;
 }
-- 
GitLab