d: Fix accesses of immutable arrays using constant index still bounds checked
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_placement_new.h
blob1ceb8b909268f3ebfc85941822609f55cf41ed89
1 //===-- sanitizer_placement_new.h -------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file is shared between AddressSanitizer and ThreadSanitizer
10 // run-time libraries.
12 // The file provides 'placement new'.
13 // Do not include it into header files, only into source files.
14 //===----------------------------------------------------------------------===//
15 #ifndef SANITIZER_PLACEMENT_NEW_H
16 #define SANITIZER_PLACEMENT_NEW_H
18 #include "sanitizer_internal_defs.h"
20 inline void *operator new(__sanitizer::operator_new_size_type sz, void *p) {
21 return p;
24 #endif // SANITIZER_PLACEMENT_NEW_H