Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Make scan-build ignore volontary null-pointer dereference.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 9 Mar 2021 08:22:03 +0000 (09:22 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Tue, 9 Mar 2021 20:14:44 +0000 (21:14 +0100)
teshsuite/mc/random-bug/random-bug.cpp

index 01f9239..733b084 100644 (file)
@@ -30,9 +30,11 @@ static void app()
     if (x == 3 && y == 4)
       abort();
   } else if (behavior == Behavior::SEGV) {
+#ifndef __clang_analyzer__
     int* A = 0;
     if (x == 3 && y == 4)
       *A = 1;
+#endif
   } else {
     DIE_IMPOSSIBLE;
   }