mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-28 01:06:06 +00:00

Skip checks for null dereference, alignment violation, object size violation, and dynamic type violation if the pointer points to volatile data. Differential Revision: https://reviews.llvm.org/D34262 llvm-svn: 305546
8 lines
245 B
C
8 lines
245 B
C
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fsanitize=null,alignment,object-size,vptr -S -emit-llvm %s -o - | FileCheck %s
|
|
|
|
// CHECK: @volatile_null_deref
|
|
void volatile_null_deref(volatile int *p) {
|
|
// CHECK-NOT: call{{.*}}ubsan
|
|
*p;
|
|
}
|