[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-24 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1495-1499 + DeclContext *DC = CurContext; + while (DC && !isa(DC) && !isa(DC) && + !isa(DC) && !isa(DC)) +DC = DC->getParent(); + return dyn_cast_or_null(DC); RIscRIpt wrote: >

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-24 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 553122. RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Rebase onto main, address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158591/new/

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-24 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 553123. RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Use isa<...> in getPredefinedExprDeclContext Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158591/new/

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-24 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. I missed this comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158591/new/ https://reviews.llvm.org/D158591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-24 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. The current implementation of `getPredefinedExprDeclContext` could be easily moved to a static function inside `clang/lib/Sema/SemaExpr.cpp` as it depends only on `Sema::CurContext` WDYT? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D157747: Support Unicode Microsoft predefined macros

2023-08-31 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. I found a way to implement `__LPREFIX`-macros-family in Clang. I need some more time to finish and polish it. Going to post it a couple of weeks later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-09-04 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D158591#4636814 , @cor3ntin wrote: > Hum. before I do > > - I think the commit message could be more explicit as to what the patch does > ("Add support of Windows Trace Logging macros" is a bit vague) > - Do we need a

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-09-04 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. @cor3ntin, thanks for asking. No, I do not have access. Please merge. Commits should have correct email and name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158591/new/ https://reviews.llvm.org/D158591

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-09-04 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. Looks good. Thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158591/new/ https://reviews.llvm.org/D158591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-10-27 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. Should I re-submit it to GitHub? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475 ___ cfe-commits mailing list

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-10-27 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked an inline comment as done. RIscRIpt added a comment. In D134475#4655389 , @erichkeane wrote: > If you can properly rebase, submit this to github, and include a summary of > the Phab discussion in a way that easy enough to catch back up

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-11-04 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. As per agreement, migrating to Github: https://github.com/llvm/llvm-project/pull/71300 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475

[PATCH] D134458: [AST] Add C++11 attribute 'msvc::no_unique_address'

2023-11-04 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. Abandoning due to lack of time and expertise. I might come back and tackle it in several months. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134458/new/

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-09-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 557270. RIscRIpt added a comment. Rebase onto main. Run lit clang/test. Bump. Any chance we continue the review? I know it looked stale for a while I couldn't address review comments, but now I have time to work at this patch. Repository: rG LLVM

[PATCH] D157747: Support Unicode Microsoft predefined macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt planned changes to this revision. RIscRIpt added a comment. While I work at `__LPREFIX`, I remove this revision from review queue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157747/new/ https://reviews.llvm.org/D157747

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked an inline comment as done. RIscRIpt added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1495-1499 + DeclContext *DC = CurContext; + while (DC && !isa(DC) && !isa(DC) && + !isa(DC) && !isa(DC)) +DC = DC->getParent(); + return

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a subscriber: pengfei. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider the following code: #include #include #include #include

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-23 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked 2 inline comments as done. RIscRIpt added inline comments. Comment at: clang/lib/Sema/Sema.cpp:1495-1499 + DeclContext *DC = CurContext; + while (DC && !isa(DC) && !isa(DC) && + !isa(DC) && !isa(DC)) +DC = DC->getParent(); + return

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 553437. RIscRIpt marked 2 inline comments as done. RIscRIpt added a comment. Address review comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158591/new/ https://reviews.llvm.org/D158591 Files:

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. Regarding new interpreter. It takes more time and effort than I expected. Here's what I found: 1. Assertion in ByteCodeExprGen::VisitPredefinedExpr

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D158591#4616728 , @RIscRIpt wrote: > And it seems that `BasePtr` points to a different object, not the one which > corresponds to StringLiteral (at step 2). If I understand everything correctly, then in

[PATCH] D158591: Add support of Windows Trace Logging macros

2023-08-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 553444. RIscRIpt added a comment. Rebased onto main, fixed commit messages, fixed formatting, re-run lit for clang/test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D158591/new/

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-14 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - 'msvc::no_tls_guard', first appeared in

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-17 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D133853#3795579 , @aaron.ballman wrote: > but my suggestion is to only support `[[msvc::constexpr]]` with the semantic > meaning of `constexpr` Sounds good to me. > It's a good question as to whether we want to support

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-15 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D133853#3792518 , @aaron.ballman wrote: > I'm wondering what the goal is for these changes. ... Are you intending to > add semantics for these attributes in follow-up patches? To be honest, I wasn't planning to do any of

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D133853#3799344 , @aaron.ballman wrote: > It's a conforming extension in older language modes like C++98, where we > couldn't steal the `constexpr` keyword because it's not reserved, which is > one benefit to it. Does MSVC

[PATCH] D134458: [AST] Add msvc-specific C++11 attributes

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 462234. RIscRIpt retitled this revision from "[AST] Add msvc-specific C++11 attribute 'msvc::no_unique_address'" to "[AST] Add msvc-specific C++11 attributes". RIscRIpt edited the summary of this revision. RIscRIpt added a comment. Add msvc::constexpr

[PATCH] D134458: [AST] Add msvc-specific C++11 attribute 'msvc::no_unique_address'

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 462274. RIscRIpt retitled this revision from "[AST] Add msvc-specific C++11 attributes" to "[AST] Add msvc-specific C++11 attribute 'msvc::no_unique_address'". RIscRIpt added a comment. Remove msvc::constexpr commit Repository: rG LLVM Github Monorepo

[PATCH] D134458: [AST] Add msvc-specific C++11 attribute 'msvc::no_unique_address'

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D134458#3809570 , @aaron.ballman wrote: > Can you split this out into two separate reviews? Sure, done: https://reviews.llvm.org/D134475 Comment at: clang/include/clang/Basic/Attr.td:3497 + +def

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. I am new to `arc`, I tried `arc diff --edit --verbatim` as it's said in the docs, but it still created a new revision: https://reviews.llvm.org/D134458 Comment at: clang/lib/Sema/SemaStmtAttr.cpp:296 + // Validation is in

[PATCH] D133853: [AST] Add msvc-specific C++11 attributes

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. Closing in favor of https://reviews.llvm.org/D134458 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133853/new/ https://reviews.llvm.org/D133853

[PATCH] D134475: [AST] Add C++11 attribute msvc::constexpr

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D134458: [AST] Add msvc-specific C++11 attribute 'msvc::no_unique_address'

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a reviewer: aaron.ballman. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D134458 Files:

[PATCH] D134458: [AST] Add C++11 attribute 'msvc::no_unique_address'

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 462297. RIscRIpt retitled this revision from "[AST] Add msvc-specific C++11 attribute 'msvc::no_unique_address'" to "[AST] Add C++11 attribute 'msvc::no_unique_address'". RIscRIpt added a comment. Add naive implementation ABI of [[msvc::no_unique_address]]

[PATCH] D134458: [AST] Add C++11 attribute 'msvc::no_unique_address'

2022-09-22 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt planned changes to this revision. RIscRIpt added a comment. TODO: add proper ABI tests of `[[msvc::no_unique_address]]` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134458/new/ https://reviews.llvm.org/D134458

[PATCH] D134475: Add C++11 attribute msvc::constexpr

2022-10-01 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 464522. RIscRIpt retitled this revision from "[AST] Add C++11 attribute msvc::constexpr" to "Add C++11 attribute msvc::constexpr". RIscRIpt added a comment. Add more tests, don't alter constexprKind of `[[msvc::constexpr]]` functions - instead change

[PATCH] D134475: Add C++11 attribute msvc::constexpr

2022-10-01 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt planned changes to this revision. RIscRIpt added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:4995-4997 + case ParsedAttr::AT_MSConstexpr: +D->addAttr(::new (S.Context) MSConstexprAttr(S.Context, AL)); +return; aaron.ballman

[PATCH] D134475: Add C++11 attribute msvc::constexpr

2022-10-02 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. > TODO: I think, I'll need to read more about constexpr for functions in > standard (and LLVM code), to add relevant restrictions here. In the standard I was able to find the following paragraphs about `constexpr`: 1. Neither constructor nor destructor can be

[PATCH] D134475: Add C++11 attribute msvc::constexpr

2023-01-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. I asked MSFT to comment, let's see if they can share the spec for this attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134475: Add C++11 attribute msvc::constexpr

2023-03-26 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. I am sorry for protracting implementation. I am still interested to finish this (if no volunteer takes over sooner). In D134475#4070995 , @RIscRIpt wrote: > I asked MSFT >

[PATCH] D134475: Add C++11 attribute msvc::constexpr

2023-04-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 515740. RIscRIpt added a comment. A proper implementation In D134475#4224082 , @erichkeane wrote: > I don't have a good idea, I don't think any sort of RAII object is the right > way (since it will be wrong on

[PATCH] D148926: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-04-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt abandoned this revision. RIscRIpt added a comment. This had to be submitted to https://reviews.llvm.org/D134475 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148926/new/ https://reviews.llvm.org/D148926

[PATCH] D148926: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-04-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a reviewer: aaron.ballman. Herald added a subscriber: jdoerfert. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo

[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-04-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt planned changes to this revision. RIscRIpt marked 2 inline comments as done. RIscRIpt added a comment. > Does it prohibit the inverse? I think this documentation overall needs a > much better description of what the semantics are here, particularly anything > that you found in

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-07 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 538025. RIscRIpt added a comment. Rebased onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-07 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 538026. RIscRIpt added a comment. Rebased onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475 Files: clang/include/clang/Basic/Attr.td

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-07 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. Added @aaron.ballman as reviewer, because he was reviewer of related patch: 878e590503dff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-18 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. According to git blame @rsmith has done lots of changes in `clang/lib/AST/ExprConstant.cpp`; added as reviewer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-19 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Thank you for your quick response. > Given that the intended use case is for usage behind the scenes in the > standard library... > I'd strongly prefer not to have a documented, user-visible attribute that > gives

[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-16 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3543 +definition or a return statement. It has no effect on function declarations. +This attribute permits constant evaluation of ``[[msvc::constexpr]]`` functions +in ``[[msvc::constexpr]]

[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-16 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 540803. RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Bump Renamed clang/test/AST/msvc-* to ms-* Tried to improve doc note. Rebased onto one of stable commits from main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-14 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 540395. RIscRIpt added a comment. Addressed review comments. In D153914#4497696 , @aaron.ballman wrote: > Sema seems like the wrong place to perform such concatenations, but given > that adjacent string literals

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-14 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Parse/Parser.h:578-582 + bool isTokenConcatenable() const { +return isTokenStringLiteral() || + getLangOpts().MicrosoftExt && + tok::isMSPredefinedMacro(Tok.getKind()); + }

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-14 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 540427. RIscRIpt added a comment. Rebased onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-14 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:87-93 +/// Return true if this token is a predefined macro +/// unexpandable by MSVC preprocessor. +inline bool isUnexpandableMsMacro(TokenKind K) { + return K == tok::kw___FUNCTION__ || K ==

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-14 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 540600. RIscRIpt marked 17 inline comments as done. RIscRIpt added a comment. Addressed review comments, rebased onto main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-19 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:87-93 +/// Return true if this token is a predefined macro +/// unexpandable by MSVC preprocessor. +inline bool isUnexpandableMsMacro(TokenKind K) { + return K == tok::kw___FUNCTION__ || K ==

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-20 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 542436. RIscRIpt marked 3 inline comments as done. RIscRIpt added a comment. Herald added a subscriber: MaskRay. Addressed review comments and rebased onto main. I have limited support of this attribute to `-fms-compatibility-version` 19.33+ (Visual Studio

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-20 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:3609-3611 +.. Note:: To use a ``[[msvc::constexpr]]`` function in a constant context, + one may want to create a ``constexpr`` function-wrapper and invoke the + ``[[msvc::constexpr]]`` function

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-20 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 542438. RIscRIpt added a comment. add HEAD~2 patch Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475 Files: clang/docs/ReleaseNotes.rst clang/docs/UsersManual.rst

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-07-20 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 542441. RIscRIpt added a comment. Fix clang/test/SemaCXX/ms-constexpr.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475 Files: clang/docs/ReleaseNotes.rst

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-20 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 542412. RIscRIpt marked 5 inline comments as done. RIscRIpt added a comment. Addressed review comments, rebased onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-20 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/lib/Parse/ParseExpr.cpp:1310-1311 + case tok::kw_L__FUNCSIG__: // primary-expression: L__FUNCSIG__ [MS] +if (!getLangOpts().MicrosoftExt || +!TokenIsLikeStringLiteral(NextToken(), getLangOpts())) { + Res =

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-15 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1972-1987 + SmallString<64> Str; + llvm::raw_svector_ostream OS(Str); + Token Exp; + Exp.startToken(); + if (Tok.getKind() == tok::kw_L__FUNCTION__ || + Tok.getKind() ==

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-15 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 540741. RIscRIpt marked 7 inline comments as done. RIscRIpt added a comment. Addressed review comments, rebased onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D134475: [Clang] Add support for [[msvc::constexpr]] C++11 attribute

2023-06-03 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 528112. RIscRIpt added a comment. Added diagnostics for [[msvc::constexpr]] virtual Regarding [[msvc::constexpr]] constructors, unfortunatelly I cannot find a reasonable way to support it. During development I found out about Clang's experimental Constant

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544088. RIscRIpt added a comment. Removed irrelevant changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914 Files: clang/include/clang/Basic/DiagnosticGroups.td

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:1981 + // parsed yet). + assert(getLangOpts().MicrosoftExt); + I think I should remove this assertion so this function would be usable without MS ext, on the other hand it would be a noop

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544085. RIscRIpt marked 6 inline comments as done. RIscRIpt added a comment. Addressed review comments, rebased onto main Noticable changes: 1. Diagnostics message 2. Support of expansion of these attributes in 2nd argument of `static_assert` 3. Moved

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:87-93 +/// Return true if this token is a predefined macro +/// unexpandable by MSVC preprocessor. +inline bool isUnexpandableMsMacro(TokenKind K) { + return K == tok::kw___FUNCTION__ || K ==

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-25 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544114. RIscRIpt marked 4 inline comments as done. RIscRIpt added a comment. Rename diagnostic messages constants Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-26 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. Thank you for the review! I apologize for missing the small details; I should have noticed and addressed them myself. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-26 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 544235. RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Rename MicrosoftStringLiteralFromPredefined Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 543109. RIscRIpt marked 5 inline comments as done. RIscRIpt added a comment. Address review comments, rebase onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-07-21 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. Thanks to your suggestion of testing different types, I realized clang does not support MSVC macros with `u`, `u8`, and `U` prefixes in addition to `L__FUNCDNAME`. By the way, clang replicates MSVC behavior a little bit incorrectly: `L__FUNCTION__` is not a valid

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-08-08 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. In D153914#4570148 , @cor3ntin wrote: > We will commit on your behalf, what name/email do you want us to use? > Thanks! Thanks for asking; keep the name/email as-is in the commit you see: `Author: Richard Dzenis `

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-08-08 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 548366. RIscRIpt marked 4 inline comments as done. RIscRIpt added a comment. Address review comments, rebase onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/

[PATCH] D134475: [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute

2023-08-11 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 549298. RIscRIpt added a comment. Rebase onto main (bump) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134475/new/ https://reviews.llvm.org/D134475 Files: clang/docs/ReleaseNotes.rst

[PATCH] D157747: Support Unicode Microsoft predefined macros

2023-08-11 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. This implementation preserves support for identifiers `L__FUNCSIG__` and `L__FUNCTION__` (which have never been supported by MSVC), and adds other identifiers for all supported encodings: L, u8, u, U. If breaking backwards compatibility in clang (with Microsoft

[PATCH] D157747: Support Unicode Microsoft predefined macros

2023-08-11 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added subscribers: PiotrZSL, carlosgalvezp, martong. Herald added a reviewer: shafik. Herald added a reviewer: njames93. Herald added a project: All. RIscRIpt requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-08-08 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 548274. RIscRIpt added a comment. Rebased onto main, run local lit clang/tests. (bump for @cor3ntin) As far as I understand this shall be merged into main by maintainers. Please let me know if something else is expected from me. Repository: rG LLVM

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-08-09 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt updated this revision to Diff 548502. RIscRIpt marked an inline comment as done. RIscRIpt added a comment. Updated comment; rebased onto main Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-08-09 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added inline comments. Comment at: clang/lib/Sema/SemaExpr.cpp:2034-2035 + // StringToks is read-only, we need backstorage for expanded macros + std::vector ExpandedToks; + if (getLangOpts().MicrosoftExt) aaron.ballman wrote: > Thanks, that's

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-06-27 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt created this revision. Herald added a project: All. RIscRIpt requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D153914 Files:

[PATCH] D153914: [clang-cl] Enable concatenation of predefined identifiers

2023-06-27 Thread Richard Dzenis via Phabricator via cfe-commits
RIscRIpt added a comment. GitHub issue: https://github.com/llvm/llvm-project/issues/63563 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153914/new/ https://reviews.llvm.org/D153914 ___ cfe-commits