[PATCH] D66100: Add __has_builtin support for builtin function-like type traits.
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 12 11:26:48 PDT 2019
rsmith created this revision.
rsmith added a reviewer: aaron.ballman.
Herald added subscribers: cfe-commits, kristina, jfb.
Herald added a project: clang.
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.
Repository:
rC Clang
https://reviews.llvm.org/D66100
Files:
docs/LanguageExtensions.rst
include/clang/Basic/Features.def
include/clang/Basic/TokenKinds.def
lib/Lex/PPMacroExpansion.cpp
test/Preprocessor/feature_tests.c
test/Preprocessor/feature_tests.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66100.214673.patch
Type: text/x-patch
Size: 20720 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190812/a9234f9d/attachment-0001.bin>
More information about the cfe-commits
mailing list