[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Jannik Silvanus via Phabricator via cfe-commits
jsilvanus accepted this revision.
jsilvanus added a comment.
This revision is now accepted and ready to land.

LGTM, but let's wait for the other reviewers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139973/new/

https://reviews.llvm.org/D139973

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D139973: [llvm] Make llvm::Any similar to std::any

2022-12-19 Thread Jannik Silvanus via Phabricator via cfe-commits
jsilvanus added a comment.

In D139973#4004344 , @barannikov88 
wrote:

> - std::any uses RTTI, so it is unlikely to ever replace llvm::Any.

I just checked on Godbolt that gcc 12.2 with libstdc++, clang 15.0 with both 
libstd++ and libc++ and MSVC 19.33 support `std::any` without RTTI. 
But gcc and clang do not provide `std::any::type` without RTTI though.

Are you aware of any documentation on what can be relied on without RTTI?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139973/new/

https://reviews.llvm.org/D139973

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D153338: [clang-format] vim integration: Mention python3 variant of bindings

2023-06-20 Thread Jannik Silvanus via Phabricator via cfe-commits
jsilvanus created this revision.
Herald added projects: All, clang, clang-format.
Herald added a subscriber: cfe-commits.
Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay.
jsilvanus requested review of this revision.
Herald added a comment.

NOTE: Clang-Format Team Automated Review Comment

It looks like your clang-format review does not contain any unit tests, please 
try to ensure all code changes have a unit test (unless this is an `NFC` or 
refactoring, adding documentation etc..)

Add your unit tests in `clang/unittests/Format` and you can build with `ninja 
FormatTests`.  We recommend using the `verifyFormat(xxx)` format of unit tests 
rather than `EXPECT_EQ` as this will ensure you change is tolerant to random 
whitespace changes (see FormatTest.cpp as an example)

For situations where your change is altering the TokenAnnotator.cpp which can 
happen if you are trying to improve the annotation phase to ensure we are 
correctly identifying the type of a token, please add a token annotator test in 
`TokenAnnotatorTest.cpp`


The instructions in the documentation only mentioned how to include
bindings for clang-format into vim using python2. Add the instructions
for python3 which were already present in the source comments.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153338

Files:
  clang/docs/ClangFormat.rst


Index: clang/docs/ClangFormat.rst
===
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -145,8 +145,13 @@
 
 .. code-block:: vim
 
-  map  :pyf /clang-format.py
-  imap  :pyf /clang-format.py
+  if has('python')
+map  :pyf /clang-format.py
+imap  :pyf /clang-format.py
+  elseif has('python3')
+map  :py3f /clang-format.py
+imap  :py3f /clang-format.py
+  endif
 
 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
 second line adds support for INSERT mode. Change "C-K" to another binding if


Index: clang/docs/ClangFormat.rst
===
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -145,8 +145,13 @@
 
 .. code-block:: vim
 
-  map  :pyf /clang-format.py
-  imap  :pyf /clang-format.py
+  if has('python')
+map  :pyf /clang-format.py
+imap  :pyf /clang-format.py
+  elseif has('python3')
+map  :py3f /clang-format.py
+imap  :py3f /clang-format.py
+  endif
 
 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
 second line adds support for INSERT mode. Change "C-K" to another binding if
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D153338: [clang-format] vim integration: Mention python3 variant of bindings

2023-06-20 Thread Jannik Silvanus via Phabricator via cfe-commits
jsilvanus updated this revision to Diff 533149.
jsilvanus added a comment.

Don't change proposed key binding from K to I,
just add the python3 part.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153338/new/

https://reviews.llvm.org/D153338

Files:
  clang/docs/ClangFormat.rst


Index: clang/docs/ClangFormat.rst
===
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -145,8 +145,13 @@
 
 .. code-block:: vim
 
-  map  :pyf /clang-format.py
-  imap  :pyf /clang-format.py
+  if has('python')
+map  :pyf /clang-format.py
+imap  :pyf /clang-format.py
+  elseif has('python3')
+map  :py3f /clang-format.py
+imap  :py3f /clang-format.py
+  endif
 
 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
 second line adds support for INSERT mode. Change "C-K" to another binding if


Index: clang/docs/ClangFormat.rst
===
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -145,8 +145,13 @@
 
 .. code-block:: vim
 
-  map  :pyf /clang-format.py
-  imap  :pyf /clang-format.py
+  if has('python')
+map  :pyf /clang-format.py
+imap  :pyf /clang-format.py
+  elseif has('python3')
+map  :py3f /clang-format.py
+imap  :py3f /clang-format.py
+  endif
 
 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
 second line adds support for INSERT mode. Change "C-K" to another binding if
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D153338: [clang-format] vim integration: Mention python3 variant of bindings

2023-06-21 Thread Jannik Silvanus via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG9741ac5b3b3e: [clang-format] vim integration: Mention 
python3 variant of bindings (authored by jsilvanus).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153338/new/

https://reviews.llvm.org/D153338

Files:
  clang/docs/ClangFormat.rst


Index: clang/docs/ClangFormat.rst
===
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -145,8 +145,13 @@
 
 .. code-block:: vim
 
-  map  :pyf /clang-format.py
-  imap  :pyf /clang-format.py
+  if has('python')
+map  :pyf /clang-format.py
+imap  :pyf /clang-format.py
+  elseif has('python3')
+map  :py3f /clang-format.py
+imap  :py3f /clang-format.py
+  endif
 
 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
 second line adds support for INSERT mode. Change "C-K" to another binding if


Index: clang/docs/ClangFormat.rst
===
--- clang/docs/ClangFormat.rst
+++ clang/docs/ClangFormat.rst
@@ -145,8 +145,13 @@
 
 .. code-block:: vim
 
-  map  :pyf /clang-format.py
-  imap  :pyf /clang-format.py
+  if has('python')
+map  :pyf /clang-format.py
+imap  :pyf /clang-format.py
+  elseif has('python3')
+map  :py3f /clang-format.py
+imap  :py3f /clang-format.py
+  endif
 
 The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the
 second line adds support for INSERT mode. Change "C-K" to another binding if
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits