[PATCH] D59221: [asan] Add gcc 8's driver option -fsanitize=pointer-compare and -fsanitize=pointer-substract.

pierre gousseau via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 12 07:12:41 PDT 2019


pgousseau marked an inline comment as done.
pgousseau added inline comments.


================
Comment at: test/Driver/fsanitize.c:837
+// RUN: %clang -target x86_64-linux-gnu -fsanitize=pointer-compare -fno-sanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-CMP
+// CHECK-POINTER-ALL: "-cc1{{.*}}-fsanitize={{.*}}pointer-compare,pointer-subtract{{.*}}" {{.*}} "-mllvm" "-asan-detect-invalid-pointer-cmp" "-mllvm" "-asan-detect-invalid-pointer-sub"
+// CHECK-POINTER-CMP-NEEDS-ADDRESS: error: invalid argument '-fsanitize=pointer-compare' only allowed with '-fsanitize=address'
----------------
thakis wrote:
> Should some of these be {{[^"}*}} instead of {{.*}} so that the match isn't accidentally across different flags?
Yes I should add one for the first check. Will add it thanks!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59221/new/

https://reviews.llvm.org/D59221





More information about the cfe-commits mailing list