Skip to content

Commit a80c62f

Browse files
authored
Move macro definition to give better out-of-the-box VSCode experience on Windows (#113557)
1 parent 728df8c commit a80c62f

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

src/coreclr/inc/debugmacros.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "stacktrace.h"
1414
#include "debugmacrosext.h"
1515
#include "palclr.h"
16+
#include <minipal/utils.h>
1617

1718
#undef _ASSERTE
1819
#undef VERIFY

src/coreclr/inc/palclr.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
#endif // !_MSC_VER
4949
#endif // !NOINLINE
5050

51-
#define ANALYZER_NORETURN
52-
5351
#ifdef _MSC_VER
5452
#define EMPTY_BASES_DECL __declspec(empty_bases)
5553
#else

src/coreclr/pal/inc/pal.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,6 @@ extern bool g_arm64_atomics_present;
132132

133133
#define DECLSPEC_NORETURN PAL_NORETURN
134134

135-
#ifdef __clang_analyzer__
136-
#define ANALYZER_NORETURN __attribute((analyzer_noreturn))
137-
#else
138-
#define ANALYZER_NORETURN
139-
#endif
140-
141135
#define EMPTY_BASES_DECL
142136

143137
#if !defined(_MSC_VER) || defined(SOURCE_FORMATTING)
@@ -1552,7 +1546,7 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
15521546
M512 Zmm30;
15531547
M512 Zmm31;
15541548
};
1555-
1549+
15561550
struct
15571551
{
15581552
DWORD64 Egpr16;
@@ -1572,7 +1566,7 @@ typedef struct DECLSPEC_ALIGN(16) _CONTEXT {
15721566
DWORD64 Egpr30;
15731567
DWORD64 Egpr31;
15741568
};
1575-
1569+
15761570
} CONTEXT, *PCONTEXT, *LPCONTEXT;
15771571

15781572
//

src/native/minipal/utils.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
// Number of characters in a string literal. Excludes terminating NULL.
1010
#define STRING_LENGTH(str) (ARRAY_SIZE(str) - 1)
1111

12+
#ifdef __clang_analyzer__
13+
#define ANALYZER_NORETURN __attribute((analyzer_noreturn))
14+
#else
15+
#define ANALYZER_NORETURN
16+
#endif
17+
1218
#ifndef __has_builtin
1319
#define __has_builtin(x) 0
1420
#endif

0 commit comments

Comments
 (0)