<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/lib/Frontend/InitPreprocessor.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[clang][NFC] Inline Frontend/FrontendDiagnostic.h -&gt; Basic/DiagnosticFrontend.h (#162883)</title>
<updated>2025-11-21T03:39:49+00:00</updated>
<author>
<name>Jordan Rupprecht</name>
<email>rupprecht@google.com</email>
</author>
<published>2025-11-21T03:39:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=3d3307ecd8bdd6d9af0d82245c5fc50e4d624a7a'/>
<id>3d3307ecd8bdd6d9af0d82245c5fc50e4d624a7a</id>
<content type='text'>
d076608d58d1ec55016eb747a995511e3a3f72aa moved some deps around to avoid
cycles and left clang/Frontend/FrontendDiagnostic.h as a shim that
simply includes clang/Basic/DiagnosticFrontend.h. This PR inlines it so
that nothing in tree still includes clang/Frontend/FrontendDiagnostic.h.

Doing this will help prevent future layering issues. See #162865.

Frontend already depends on Basic, so no new deps need to be added
anywhere except for places that do strict dep checking.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
d076608d58d1ec55016eb747a995511e3a3f72aa moved some deps around to avoid
cycles and left clang/Frontend/FrontendDiagnostic.h as a shim that
simply includes clang/Basic/DiagnosticFrontend.h. This PR inlines it so
that nothing in tree still includes clang/Frontend/FrontendDiagnostic.h.

Doing this will help prevent future layering issues. See #162865.

Frontend already depends on Basic, so no new deps need to be added
anywhere except for places that do strict dep checking.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Make "__GCC_HAVE_DWARF2_CFI_ASM" a proper predefined macro (#165731)</title>
<updated>2025-11-03T18:09:18+00:00</updated>
<author>
<name>Cyndy Ishida</name>
<email>cyndy_ishida@apple.com</email>
</author>
<published>2025-11-03T18:09:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d65e712e30a8998c897a6454e4eaea4f974bf765'/>
<id>d65e712e30a8998c897a6454e4eaea4f974bf765</id>
<content type='text'>
Use a flag to determine whether this macro should be set when
intializing the preprocessor.

This macro was added to the driver in
9d117e7b2a399a9b2bcf53fb9b9c0946e82dc75c because it can be conditionally
disabled, but before that, the flag to gate behavior was removed under
the assumption it wasn't conditional in
b5b622a03c5136fa10d245dbe1f8f278ebd98d1b. This patch is to connect the
macro with the preexisting flag</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use a flag to determine whether this macro should be set when
intializing the preprocessor.

This macro was added to the driver in
9d117e7b2a399a9b2bcf53fb9b9c0946e82dc75c because it can be conditionally
disabled, but before that, the flag to gate behavior was removed under
the assumption it wasn't conditional in
b5b622a03c5136fa10d245dbe1f8f278ebd98d1b. This patch is to connect the
macro with the preexisting flag</pre>
</div>
</content>
</entry>
<entry>
<title>[C2y] Support WG14 N3457, the __COUNTER__ macro (#162662)</title>
<updated>2025-11-03T12:50:25+00:00</updated>
<author>
<name>Aaron Ballman</name>
<email>aaron@aaronballman.com</email>
</author>
<published>2025-11-03T12:50:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=df1d786c460e0e47c9074f3533f098190ebfbc1b'/>
<id>df1d786c460e0e47c9074f3533f098190ebfbc1b</id>
<content type='text'>
This implements the parts of
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3457.htm which were
adopted at the recent meeting in Brno.

Clang already implemented `__COUNTER__`, but needed some changes for
conformance. Specifically, we now diagnose when the macro is expanded
more than 2147483647 times. Additionally, we now give the expected
extension and pre-compat warnings for the feature.

To support testing the limits, this also adds a -cc1-only option,
`-finitial-counter-value=`, which lets you specify the initial value the
`__COUNTER__` macro should expand to.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This implements the parts of
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3457.htm which were
adopted at the recent meeting in Brno.

Clang already implemented `__COUNTER__`, but needed some changes for
conformance. Specifically, we now diagnose when the macro is expanded
more than 2147483647 times. Additionally, we now give the expected
extension and pre-compat warnings for the feature.

To support testing the limits, this also adds a -cc1-only option,
`-finitial-counter-value=`, which lets you specify the initial value the
`__COUNTER__` macro should expand to.</pre>
</div>
</content>
</entry>
<entry>
<title>[HLSL] Add NativeInt16Type langopt to control whether short type is supported. Enabled by default for all but HLSL. (#165584)</title>
<updated>2025-10-31T16:49:32+00:00</updated>
<author>
<name>Sarah Spall</name>
<email>sarahspall@microsoft.com</email>
</author>
<published>2025-10-31T16:49:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=42004193f4e22a61dc68f6414b82077edd1314e2'/>
<id>42004193f4e22a61dc68f6414b82077edd1314e2</id>
<content type='text'>
Add a new langopt NativeInt16Type to control support for 16 bit
integers.
Enable by default for all languages but HLSL. 
HLSL defines uint16_t and int16_t as a typedef of short. If
-enable-16bit-types is not used, the typedefs don't exist so int16_t and
uint16_t can't be used. However, short was still allowed. This change
will produce an error 'unknown type name short' if -enable-16bit-types
isn't used.
Update failing tests. 
Add new test.
Closes #81779</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new langopt NativeInt16Type to control support for 16 bit
integers.
Enable by default for all languages but HLSL. 
HLSL defines uint16_t and int16_t as a typedef of short. If
-enable-16bit-types is not used, the typedefs don't exist so int16_t and
uint16_t can't be used. However, short was still allowed. This change
will produce an error 'unknown type name short' if -enable-16bit-types
isn't used.
Update failing tests. 
Add new test.
Closes #81779</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Add support for cluster sync scope (#162575)</title>
<updated>2025-10-21T10:47:26+00:00</updated>
<author>
<name>macurtis-amd</name>
<email>macurtis@amd.com</email>
</author>
<published>2025-10-21T10:47:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=5440cfc4505ffd242d3a75633b92c355c245bcae'/>
<id>5440cfc4505ffd242d3a75633b92c355c245bcae</id>
<content type='text'>
From Sam Liu:
&gt;CUDA supports thread block clusters
https://docs.nvidia.com/cuda/cuda-c-programming-guide/#thread-block-clusters
&gt;
&gt;In their atomic intrinsics, cluster scope is supported
https://docs.nvidia.com/cuda/cuda-c-programming-guide/#nv-atomic-fetch-add-and-nv-atomic-add
&gt;
&gt;For compatibility, clang and hip needs to support cluster scope.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
From Sam Liu:
&gt;CUDA supports thread block clusters
https://docs.nvidia.com/cuda/cuda-c-programming-guide/#thread-block-clusters
&gt;
&gt;In their atomic intrinsics, cluster scope is supported
https://docs.nvidia.com/cuda/cuda-c-programming-guide/#nv-atomic-fetch-add-and-nv-atomic-add
&gt;
&gt;For compatibility, clang and hip needs to support cluster scope.</pre>
</div>
</content>
</entry>
<entry>
<title>[clang][Basic] Add helper APIs to get language version codes from LangOptions (#163348)</title>
<updated>2025-10-15T14:18:25+00:00</updated>
<author>
<name>Michael Buch</name>
<email>michaelbuch12@gmail.com</email>
</author>
<published>2025-10-15T14:18:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=be93399e619848c96b101172e68c29336fa589fe'/>
<id>be93399e619848c96b101172e68c29336fa589fe</id>
<content type='text'>
Motivated by this discussion:
https://github.com/llvm/llvm-project/pull/163208#discussion_r2426842999

We will soon want to emit language version codes into debug-info.
Instead of replicating the `LangOptions -&gt; version code` mapping we
thought we'd try to share some of the logic with the Clang frontend.

This patch teaches `LangStandard` about language versions (currently just C++ and C).</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Motivated by this discussion:
https://github.com/llvm/llvm-project/pull/163208#discussion_r2426842999

We will soon want to emit language version codes into debug-info.
Instead of replicating the `LangOptions -&gt; version code` mapping we
thought we'd try to share some of the logic with the Clang frontend.

This patch teaches `LangStandard` about language versions (currently just C++ and C).</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Wire up -fsanitize=alloc-token (#156839)</title>
<updated>2025-10-08T18:59:24+00:00</updated>
<author>
<name>Marco Elver</name>
<email>elver@google.com</email>
</author>
<published>2025-10-08T18:59:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=774ffe5cce7392e6b4e29c83e725337727c2c994'/>
<id>774ffe5cce7392e6b4e29c83e725337727c2c994</id>
<content type='text'>
Wire up the `-fsanitize=alloc-token` command-line option, hooking up
the `AllocToken` pass -- it provides allocation tokens to compatible
runtime allocators, enabling different heap organization strategies,
e.g. hardening schemes based on heap partitioning.

The instrumentation rewrites standard allocation calls into variants
that accept an additional `size_t token_id` argument. For example,
calls to `malloc(size)` become `__alloc_token_malloc(size, token_id)`,
and a C++ `new MyType` expression will call
`__alloc_token__Znwm(size, token_id)`.

Currently untyped allocation calls do not yet have `!alloc_token`
metadata, and therefore receive the fallback token only. This will be
fixed in subsequent changes through best-effort type-inference.

One benefit of the instrumentation approach is that it can be applied
transparently to large codebases, and scales in deployment as other
sanitizers.

Similarly to other sanitizers, instrumentation can selectively be
controlled using `__attribute__((no_sanitize("alloc-token")))`. Support
for sanitizer ignorelists to disable instrumentation for specific
functions or source files is implemented.

See clang/docs/AllocToken.rst for more usage instructions.

Link:
https://discourse.llvm.org/t/rfc-a-framework-for-allocator-partitioning-hints/87434

---

This change is part of the following series:
  1. https://github.com/llvm/llvm-project/pull/160131
  2. https://github.com/llvm/llvm-project/pull/156838
  3. https://github.com/llvm/llvm-project/pull/162098
  4. https://github.com/llvm/llvm-project/pull/162099
  5. https://github.com/llvm/llvm-project/pull/156839
  6. https://github.com/llvm/llvm-project/pull/156840
  7. https://github.com/llvm/llvm-project/pull/156841
  8. https://github.com/llvm/llvm-project/pull/156842</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wire up the `-fsanitize=alloc-token` command-line option, hooking up
the `AllocToken` pass -- it provides allocation tokens to compatible
runtime allocators, enabling different heap organization strategies,
e.g. hardening schemes based on heap partitioning.

The instrumentation rewrites standard allocation calls into variants
that accept an additional `size_t token_id` argument. For example,
calls to `malloc(size)` become `__alloc_token_malloc(size, token_id)`,
and a C++ `new MyType` expression will call
`__alloc_token__Znwm(size, token_id)`.

Currently untyped allocation calls do not yet have `!alloc_token`
metadata, and therefore receive the fallback token only. This will be
fixed in subsequent changes through best-effort type-inference.

One benefit of the instrumentation approach is that it can be applied
transparently to large codebases, and scales in deployment as other
sanitizers.

Similarly to other sanitizers, instrumentation can selectively be
controlled using `__attribute__((no_sanitize("alloc-token")))`. Support
for sanitizer ignorelists to disable instrumentation for specific
functions or source files is implemented.

See clang/docs/AllocToken.rst for more usage instructions.

Link:
https://discourse.llvm.org/t/rfc-a-framework-for-allocator-partitioning-hints/87434

---

This change is part of the following series:
  1. https://github.com/llvm/llvm-project/pull/160131
  2. https://github.com/llvm/llvm-project/pull/156838
  3. https://github.com/llvm/llvm-project/pull/162098
  4. https://github.com/llvm/llvm-project/pull/162099
  5. https://github.com/llvm/llvm-project/pull/156839
  6. https://github.com/llvm/llvm-project/pull/156840
  7. https://github.com/llvm/llvm-project/pull/156841
  8. https://github.com/llvm/llvm-project/pull/156842</pre>
</div>
</content>
</entry>
<entry>
<title>[C++20] [Modules] Set the feature testing macro to 1 (#161034)</title>
<updated>2025-09-29T07:01:05+00:00</updated>
<author>
<name>Chuanqi Xu</name>
<email>yedeng.yd@linux.alibaba.com</email>
</author>
<published>2025-09-29T07:01:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b3fe1b6db39e42e73131b483f4401f4bf3b05444'/>
<id>b3fe1b6db39e42e73131b483f4401f4bf3b05444</id>
<content type='text'>
See https://github.com/llvm/llvm-project/issues/71364 for details.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See https://github.com/llvm/llvm-project/issues/71364 for details.</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Set the FTM for trivial relocation (#142936)</title>
<updated>2025-09-12T06:04:44+00:00</updated>
<author>
<name>Corentin Jabot</name>
<email>corentinjabot@gmail.com</email>
</author>
<published>2025-09-12T06:04:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=73cfd45e3401b18730e283b8a13e21fb85de3a38'/>
<id>73cfd45e3401b18730e283b8a13e21fb85de3a38</id>
<content type='text'>
The language of side seems fairly stable.
Setting the feature test macro will ease implementation in standard
libraries.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The language of side seems fairly stable.
Setting the feature test macro will ease implementation in standard
libraries.</pre>
</div>
</content>
</entry>
<entry>
<title>[Frontend] Define __SANITIZE__ macros for kernel address variants (#156543)</title>
<updated>2025-09-08T18:33:57+00:00</updated>
<author>
<name>Nathan Chancellor</name>
<email>nathan@kernel.org</email>
</author>
<published>2025-09-08T18:33:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=df430c33a71ffb22b8d33d24538775c5fc9de6e1'/>
<id>df430c33a71ffb22b8d33d24538775c5fc9de6e1</id>
<content type='text'>
GCC defines these macros for both userspace and kernel address
sanitizers:

$ gcc -E -dM -fsanitize=address -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_ADDRESS__ 1
$ gcc -E -dM -fsanitize=kernel-address -x c /dev/null &amp;| string match
-er SANITIZE
    #define __SANITIZE_ADDRESS__ 1
$ gcc -E -dM -fsanitize=hwaddress -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_HWADDRESS__ 1
$ gcc -E -dM -fsanitize=kernel-hwaddress -x c /dev/null &amp;| string match
-er SANITIZE
    #define __SANITIZE_HWADDRESS__ 1

PR #153888 added these same defines for clang but only for the userspace
address sanitizers:

$ clang -E -dM -fsanitize=address -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_ADDRESS__ 1
$ clang -E -dM -fsanitize=kernel-address -x c /dev/null &amp;| string match
-er SANITIZE
$ clang -E -dM -fsanitize=hwaddress -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_HWADDRESS__ 1
$ clang -E -dM -fsanitize=kernel-hwaddress -x c /dev/null &amp;| string
match -er SANITIZE

Match GCC's behavior so that the Linux kernel can eventually drop its
own internal defines.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
GCC defines these macros for both userspace and kernel address
sanitizers:

$ gcc -E -dM -fsanitize=address -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_ADDRESS__ 1
$ gcc -E -dM -fsanitize=kernel-address -x c /dev/null &amp;| string match
-er SANITIZE
    #define __SANITIZE_ADDRESS__ 1
$ gcc -E -dM -fsanitize=hwaddress -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_HWADDRESS__ 1
$ gcc -E -dM -fsanitize=kernel-hwaddress -x c /dev/null &amp;| string match
-er SANITIZE
    #define __SANITIZE_HWADDRESS__ 1

PR #153888 added these same defines for clang but only for the userspace
address sanitizers:

$ clang -E -dM -fsanitize=address -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_ADDRESS__ 1
$ clang -E -dM -fsanitize=kernel-address -x c /dev/null &amp;| string match
-er SANITIZE
$ clang -E -dM -fsanitize=hwaddress -x c /dev/null &amp;| string match -er
SANITIZE
    #define __SANITIZE_HWADDRESS__ 1
$ clang -E -dM -fsanitize=kernel-hwaddress -x c /dev/null &amp;| string
match -er SANITIZE

Match GCC's behavior so that the Linux kernel can eventually drop its
own internal defines.</pre>
</div>
</content>
</entry>
</feed>
