[PATCH] D39793: [asan] Remove semicolon after do {} while (0)

Tom de Vries via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 8 04:52:23 PST 2017


vries created this revision.
Herald added a subscriber: kubamracek.

this removes a semicolon after "do {} while (0)" in CHECK_SMALL_REGION. This allows the macro to be used in if-then-elses without curly braces.

[ https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00298.html ]


https://reviews.llvm.org/D39793

Files:
  lib/asan/asan_poisoning.cc


Index: lib/asan/asan_poisoning.cc
===================================================================
--- lib/asan/asan_poisoning.cc
+++ lib/asan/asan_poisoning.cc
@@ -217,7 +217,7 @@
       uptr __bad = __asan_region_is_poisoned(__p, __size);    \
       __asan_report_error(pc, bp, sp, __bad, isWrite, __size, 0);\
     }                                                         \
-  } while (false);                                            \
+  } while (false)
 
 
 extern "C" SANITIZER_INTERFACE_ATTRIBUTE


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39793.122062.patch
Type: text/x-patch
Size: 512 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171108/c718c493/attachment.bin>


More information about the cfe-commits mailing list