Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Prog2
/
ell_feladat
/
Test
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5bf65a5d
authored
3 months ago
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'clang-makro-redef' into 'master'
Clang makro redef See merge request
!1
parents
1abe320e
7db37f6f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
memtrace.h
+11
-0
No files found.
memtrace.h
View file @
5bf65a5d
...
...
@@ -6,6 +6,7 @@ Kanari: Szeberenyi Imre, 2013.,
VS 2012: Szeberényi Imre, 2015.,
mem_dump: 2016.
inclue-ok: 2017., 2018., 2019., 2021., 2022.
clang-mágia:Bodor András, 2025
*********************************/
#ifndef MEMTRACE_H
...
...
@@ -222,6 +223,16 @@ void operator delete[](void * p, size_t) THROW_NOTHING;
void
operator
delete
(
void
*
p
,
int
,
const
char
*
)
THROW_NOTHING
;
void
operator
delete
[](
void
*
p
,
int
,
const
char
*
)
THROW_NOTHING
;
// clang >= 3.1 esetén vannak warningok, amiket zavar, hogy redefiniálva van a new/delete
#if defined(__clang__) && (__clang_major__ > 3 || \
(__clang_major__ == 3 && __clang_minor__ > 0))
// Csak nagyon drasztikus warning szint mellet jön elő, amikor van rekurzívnak tűnő makró.
// Ilyenek a new és delete alább, hiszen olyan, mintha magukat hívnák, pedig nincs (ilyen)
// rekurzió makró szinten.
# pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
// Bármilyen kulcsszó újradefiniálása esetén pánikol.
# pragma clang diagnostic ignored "-Wkeyword-macro"
#endif
#define new new(__LINE__, __FILE__)
#define delete memtrace::set_delete_call(__LINE__, __FILE__),delete
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment