[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-21 Thread Evgeny Shulgin via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5b567637e22b: [Clang] Add __has_constexpr_builtin support (authored by Izaron). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-20 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik accepted this revision. shafik added a comment. LGTM, thanks for explaining what I was missing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136036/new/ https://reviews.llvm.org/D136036 ___

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but please wait for @shafik before landing, in case he has more feedback or questions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-18 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D136036#3863519 , @Izaron wrote: >> It looks like unrelated formatting changes snuck in to this file. > > @aaron.ballman JFYI after I reverted what `git clang-format HEAD~1` did to > the code, the build has failed > >

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. > It looks like unrelated formatting changes snuck in to this file. @aaron.ballman JFYI after I reverted what `git clang-format HEAD~1` did to the code, the build has failed ERROR git-clang-format returned an non-zero exit code 1 Build completed with failures

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added inline comments. Comment at: clang/docs/LanguageExtensions.rst:96 +the constant evaluation of the corresponding builtin (for example, +``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. + Izaron wrote: > Just to be clear: this isn't a

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added inline comments. Comment at: clang/docs/LanguageExtensions.rst:96 +the constant evaluation of the corresponding builtin (for example, +``std::fmax`` calls ``__builtin_fmax``) is supported in Clang. + Just to be clear: this isn't a true statement now

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added a comment. In D136036#3862065 , @aaron.ballman wrote: > Can you also add documentation and a release note for the new feature testing > macro? In D136036#3862649 , @shafik wrote: > Please add

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron added inline comments. Comment at: clang/lib/Lex/PPMacroExpansion.cpp:370 // Clang Extensions. - Ident__FILE_NAME__ = RegisterBuiltinMacro(*this, "__FILE_NAME__"); - Ident__has_feature = RegisterBuiltinMacro(*this, "__has_feature"); - Ident__has_extension

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 468314. Izaron marked 2 inline comments as done. Izaron added a comment. Add more parsing tests. Fix unrelated formatting changes. Add release notes and docs. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. The changes to the various `Vist*CallExpr` functions don't seem directly related to supporting `__has_constexpr_builtin`, can you explain the purpose of those changes? If they are not directly related maybe it makes more sense for them to be split off into a follow-up

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Shafik Yaghmour via Phabricator via cfe-commits
shafik added a comment. In D136036#3860945 , @Izaron wrote: > This macro will be needed because we are making constexpr `` and > ``. We will conditionally make the functions constexpr until all > supported compilers have full support. > > We had a

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. need some Sema tests to verify a constexpr builtin is const evaluated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136036/new/ https://reviews.llvm.org/D136036 ___ cfe-commits

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Can you also add documentation and a release note for the new feature testing macro? Comment at: clang/lib/Lex/PPMacroExpansion.cpp:370 // Clang Extensions. - Ident__FILE_NAME__ = RegisterBuiltinMacro(*this, "__FILE_NAME__"); -

[PATCH] D136036: [Clang] Add __has_constexpr_builtin support

2022-10-16 Thread Evgeny Shulgin via Phabricator via cfe-commits
Izaron updated this revision to Diff 468068. Izaron added a comment. Changed `llvm_unreachable` to just `return false`. I thought it is more secure. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136036/new/ https://reviews.llvm.org/D136036 Files: