<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/clang/test/Preprocessor/feature_tests.c, 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][clang-cl] Implement `__builtin_FUNCSIG`</title>
<updated>2023-05-19T16:02:44+00:00</updated>
<author>
<name>Jakub Mazurkiewicz</name>
<email>mazkuba3@gmail.com</email>
</author>
<published>2023-05-19T15:57:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=78d8312acea96f58f13a876f98d241590c16d530'/>
<id>78d8312acea96f58f13a876f98d241590c16d530</id>
<content type='text'>
This patch implements __builtin_FUNCSIG intrinsic which returns the same string as __FUNCSIG__.

Fixes https://github.com/llvm/llvm-project/issues/58951
Differential Revision: https://reviews.llvm.org/D150183
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements __builtin_FUNCSIG intrinsic which returns the same string as __FUNCSIG__.

Fixes https://github.com/llvm/llvm-project/issues/58951
Differential Revision: https://reviews.llvm.org/D150183
</pre>
</div>
</content>
</entry>
<entry>
<title>Add __builtin_FILE_NAME()</title>
<updated>2023-03-17T13:52:41+00:00</updated>
<author>
<name>Ilya Karapsin</name>
<email>ilya84050@gmail.com</email>
</author>
<published>2023-03-17T13:50:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=2147e940e8a8f85f97f28407989c628886b5cd7e'/>
<id>2147e940e8a8f85f97f28407989c628886b5cd7e</id>
<content type='text'>
Add '__builtin_FILE_NAME()', which expands to the filename because the
full path is not always needed. It corresponds to the '__FILE_NAME__'
predefined macro and is consistent with the other '__builin' functions
added for predefined macros.

Differential Revision: https://reviews.llvm.org/D144878
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add '__builtin_FILE_NAME()', which expands to the filename because the
full path is not always needed. It corresponds to the '__FILE_NAME__'
predefined macro and is consistent with the other '__builin' functions
added for predefined macros.

Differential Revision: https://reviews.llvm.org/D144878
</pre>
</div>
</content>
</entry>
<entry>
<title>[clang] Fix __has_builtin</title>
<updated>2022-05-19T15:34:42+00:00</updated>
<author>
<name>Yaxun (Sam) Liu</name>
<email>yaxun.liu@amd.com</email>
</author>
<published>2022-05-17T19:12:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=cefe472c51fbcd1aed4d4a090709f25a12a8bc2c'/>
<id>cefe472c51fbcd1aed4d4a090709f25a12a8bc2c</id>
<content type='text'>
Fix __has_builtin to return 1 only if the requested target features
of a builtin are enabled by refactoring the code for checking
required target features of a builtin and use it in evaluation
of __has_builtin.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D125829
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix __has_builtin to return 1 only if the requested target features
of a builtin are enabled by refactoring the code for checking
required target features of a builtin and use it in evaluation
of __has_builtin.

Reviewed by: Artem Belevich

Differential Revision: https://reviews.llvm.org/D125829
</pre>
</div>
</content>
</entry>
<entry>
<title>Add __has_builtin support for builtin function-like type traits.</title>
<updated>2019-08-14T02:30:11+00:00</updated>
<author>
<name>Richard Smith</name>
<email>richard-llvm@metafoo.co.uk</email>
</author>
<published>2019-08-14T02:30:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=dac3ea4eb3f6fc75be4305b9b7ed1a861ea5993e'/>
<id>dac3ea4eb3f6fc75be4305b9b7ed1a861ea5993e</id>
<content type='text'>
Summary:
Previously __has_builtin(__builtin_*) would return false for
__builtin_*s that we modeled as keywords rather than as functions
(because they take type arguments). With this patch, all builtins
that are called with function-call-like syntax return true from
__has_builtin (covering __builtin_* and also the __is_* and __has_* type
traits and the handful of similar builtins without such a prefix).

Update the documentation on __has_builtin and on type traits to match.
While doing this I noticed the type trait documentation was out of date
and incomplete; that's fixed here too.

Reviewers: aaron.ballman

Subscribers: jfb, kristina, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66100

llvm-svn: 368785
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
Previously __has_builtin(__builtin_*) would return false for
__builtin_*s that we modeled as keywords rather than as functions
(because they take type arguments). With this patch, all builtins
that are called with function-call-like syntax return true from
__has_builtin (covering __builtin_* and also the __is_* and __has_* type
traits and the handful of similar builtins without such a prefix).

Update the documentation on __has_builtin and on type traits to match.
While doing this I noticed the type trait documentation was out of date
and incomplete; that's fixed here too.

Reviewers: aaron.ballman

Subscribers: jfb, kristina, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D66100

llvm-svn: 368785
</pre>
</div>
</content>
</entry>
<entry>
<title>Make __has_builtin work with __builtin_LINE and friends.</title>
<updated>2019-05-29T03:15:36+00:00</updated>
<author>
<name>Eric Fiselier</name>
<email>eric@efcs.ca</email>
</author>
<published>2019-05-29T03:15:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=586831b2b098fe572b34f411ddaff3b21b053a4b'/>
<id>586831b2b098fe572b34f411ddaff3b21b053a4b</id>
<content type='text'>
The source location builtins are implemented as keywords, but
__has_builtin should still report true for them.

This patch also fixes a test failure on systemz where the alignment
of string literals is 2 not 1.

llvm-svn: 361920
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The source location builtins are implemented as keywords, but
__has_builtin should still report true for them.

This patch also fixes a test failure on systemz where the alignment
of string literals is 2 not 1.

llvm-svn: 361920
</pre>
</div>
</content>
</entry>
<entry>
<title>[Clang] Add __builtin_launder</title>
<updated>2018-12-14T21:11:28+00:00</updated>
<author>
<name>Eric Fiselier</name>
<email>eric@efcs.ca</email>
</author>
<published>2018-12-14T21:11:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=261875054e5ebbc7b7ec17b0febecdb5e8507b4c'/>
<id>261875054e5ebbc7b7ec17b0febecdb5e8507b4c</id>
<content type='text'>
Summary:
This patch adds `__builtin_launder`, which is required to implement `std::launder`. Additionally GCC provides `__builtin_launder`, so thing brings Clang in-line with GCC.

I'm not exactly sure what magic `__builtin_launder` requires, but  based on previous discussions this patch applies a `@llvm.invariant.group.barrier`. As noted in previous discussions, this may not be enough to correctly handle vtables.

Reviewers: rnk, majnemer, rsmith

Reviewed By: rsmith

Subscribers: kristina, Romain-Geissler-1A, erichkeane, amharc, jroelofs, cfe-commits, Prazek

Differential Revision: https://reviews.llvm.org/D40218

llvm-svn: 349195
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
This patch adds `__builtin_launder`, which is required to implement `std::launder`. Additionally GCC provides `__builtin_launder`, so thing brings Clang in-line with GCC.

I'm not exactly sure what magic `__builtin_launder` requires, but  based on previous discussions this patch applies a `@llvm.invariant.group.barrier`. As noted in previous discussions, this may not be enough to correctly handle vtables.

Reviewers: rnk, majnemer, rsmith

Reviewed By: rsmith

Subscribers: kristina, Romain-Geissler-1A, erichkeane, amharc, jroelofs, cfe-commits, Prazek

Differential Revision: https://reviews.llvm.org/D40218

llvm-svn: 349195
</pre>
</div>
</content>
</entry>
<entry>
<title>Consolidate and improve the handling of built-in feature-like macros</title>
<updated>2016-04-05T08:36:47+00:00</updated>
<author>
<name>Andy Gibbs</name>
<email>andyg1001@hotmail.co.uk</email>
</author>
<published>2016-04-05T08:36:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=50b6ceff1f0648084e0d6edc3038d35892de14ba'/>
<id>50b6ceff1f0648084e0d6edc3038d35892de14ba</id>
<content type='text'>
Summary:
The parsing logic has been separated out from the macro implementation logic, leading to a number of improvements:

* Gracefully handle unexpected/invalid tokens, too few, too many and nested parameters
* Provide consistent behaviour between all built-in feature-like macros
* Simplify the implementation of macro logic
* Fix __is_identifier to correctly return '0' for non-identifiers

Reviewers: doug.gregor, rsmith

Subscribers: rsmith, cfe-commits

Differential Revision: http://reviews.llvm.org/D17149

llvm-svn: 265381
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
The parsing logic has been separated out from the macro implementation logic, leading to a number of improvements:

* Gracefully handle unexpected/invalid tokens, too few, too many and nested parameters
* Provide consistent behaviour between all built-in feature-like macros
* Simplify the implementation of macro logic
* Fix __is_identifier to correctly return '0' for non-identifiers

Reviewers: doug.gregor, rsmith

Subscribers: rsmith, cfe-commits

Differential Revision: http://reviews.llvm.org/D17149

llvm-svn: 265381
</pre>
</div>
</content>
</entry>
<entry>
<title>Preprocessor: Recover instead of mutating a token in ExpandBuiltinMacro</title>
<updated>2014-12-15T09:03:58+00:00</updated>
<author>
<name>David Majnemer</name>
<email>david.majnemer@gmail.com</email>
</author>
<published>2014-12-15T09:03:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d616362fe3dc7074945fd476ba8c43fa82524f87'/>
<id>d616362fe3dc7074945fd476ba8c43fa82524f87</id>
<content type='text'>
We would CreateString on arbitrary garbage instead of just skipping to
the end of the builtin macro.  Eventually, this would cause us to crash
because we would end up replacing the contents of a character token with
a numeric literal.

This fixes PR21825.

llvm-svn: 224238
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We would CreateString on arbitrary garbage instead of just skipping to
the end of the builtin macro.  Eventually, this would cause us to crash
because we would end up replacing the contents of a character token with
a numeric literal.

This fixes PR21825.

llvm-svn: 224238
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the intrinsic __builtin_convertvector</title>
<updated>2013-09-18T03:29:45+00:00</updated>
<author>
<name>Hal Finkel</name>
<email>hfinkel@anl.gov</email>
</author>
<published>2013-09-18T03:29:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=c4d7c82c7f7356ac9aca70d67593479897ad7f2b'/>
<id>c4d7c82c7f7356ac9aca70d67593479897ad7f2b</id>
<content type='text'>
LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

llvm-svn: 190915
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
LLVM supports applying conversion instructions to vectors of the same number of
elements (fptrunc, fptosi, etc.) but there had been no way for a Clang user to
cause such instructions to be generated when using builtin vector types.

C-style casting on vectors is already defined in terms of bitcasts, and so
cannot be used for these conversions as well (without leading to a very
confusing set of semantics). As a result, this adds a __builtin_convertvector
intrinsic (patterned after the OpenCL __builtin_astype intrinsic). This is
intended to aid the creation of vector intrinsic headers that create generic IR
instead of target-dependent intrinsics (in other words, this is a generic
_mm_cvtepi32_ps). As noted in the documentation, the action of
__builtin_convertvector is defined in terms of the action of a C-style cast on
each vector element.

llvm-svn: 190915
</pre>
</div>
</content>
</entry>
<entry>
<title>Prevent premature macro expansion in __has_builtin, __has_feature,</title>
<updated>2012-11-17T19:18:27+00:00</updated>
<author>
<name>Andy Gibbs</name>
<email>andyg1001@hotmail.co.uk</email>
</author>
<published>2012-11-17T19:18:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=d41d09424487d386b780986a030d9915af4fdee1'/>
<id>d41d09424487d386b780986a030d9915af4fdee1</id>
<content type='text'>
__has_attribute, __has_extension, making them behave more akin to
conventional macros.

llvm-svn: 168268
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
__has_attribute, __has_extension, making them behave more akin to
conventional macros.

llvm-svn: 168268
</pre>
</div>
</content>
</entry>
</feed>
