[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. High Integrity C++ is often used as a standard for safety-critical systems. High Integrity C++ requires no assembler due to portability issues. Not my choice of wording. I plan to implement more of the High Integrity C++ checks, some of which are more obviously

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 87207. jbcoe marked an inline comment as done. jbcoe added a comment. Improve diagnostic message. Find other sorts of inline assembler. Minor fixes for other review comments. https://reviews.llvm.org/D29267 Files:

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. @alexfh Can we defer moving this to a compiler diagnostic? I'm keen to get a target in place for people to write more safety checks. https://reviews.llvm.org/D29267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang-tools-extra/clang-tidy/safety/NoAssemblerCheck.cpp:32 + + diag(ASM->getAsmLoc(), "'%0' is an inline assembler statement") << SourceText; +} aaron.ballman wrote: > The

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. @JonasToth My main intention with this patch is to provide such a starting point. A few people have mentioned that they'd be keen to contribute checks. https://reviews.llvm.org/D29267 ___ cfe-commits mailing list

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang-tools-extra/clang-tidy/safety/NoAssemblerCheck.cpp:13 +#include "clang/ASTMatchers/ASTMatchFinder.h" +#include "clang/Lex/Lexer.h" + Eugene.Zelenko wrote: > aaron.ballman

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. @aaron.ballman I will address post-approval comments post-commit. Repository: rL LLVM https://reviews.llvm.org/D29267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. @idlecode please can you approve if it LGTY? https://reviews.llvm.org/D29267 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-06 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL294255: [clang-tidy] safety-no-assembler (authored by jbcoe). Changed prior to commit: https://reviews.llvm.org/D29267?vs=87207=87314#toc Repository: rL LLVM https://reviews.llvm.org/D29267 Files:

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-02-04 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added inline comments. Comment at: clang-tools-extra/test/clang-tidy/safety-no-assembler.cpp:2 +// RUN: %check_clang_tidy %s safety-no-assembler %t + +void f() { idlecode wrote: > Maybe this check should handle

[PATCH] D29118: [clang-tidy] safety-no-vector-bool

2017-02-01 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe abandoned this revision. jbcoe added a comment. Posting a comment re-opened this patch. The approach taken cannot handle templates using `std::vector`, a radical rework is needed. https://reviews.llvm.org/D29267 introduces the safety critical module with a much simpler check (no

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-01-30 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 86289. jbcoe added a comment. Add link to HIC++ website and fix release notes. https://reviews.llvm.org/D29267 Files: clang-tools-extra/clang-tidy/CMakeLists.txt clang-tools-extra/clang-tidy/safety/CMakeLists.txt

[PATCH] D29118: [clang-tidy] safety-no-vector-bool

2017-01-29 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked 5 inline comments as done. jbcoe added a comment. Handling code like `std::pair` is currently eluding me. If I define `std::pair` to have members `first` and `second` then `std::pair` triggers the `vector` diagnostic but in the template, not the

[PATCH] D29118: [clang-tidy] safety-no-vector-bool

2017-01-29 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 86225. jbcoe added a comment. Minor changes in response to review comments. Patch abandoned as approach taken cannot handle templates. https://reviews.llvm.org/D29118 Files: clang-tools-extra/clang-tidy/CMakeLists.txt

[PATCH] D29267: [clang-tidy] safety-no-assembler

2017-01-29 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a project: clang-tools-extra. Herald added subscribers: JDevlieghere, mgorny. Add a new clang-tidy module for safety-critical checks. Include a check for inline assembler. https://reviews.llvm.org/D29267 Files:

[PATCH] D29118: [clang-tidy] safety-no-vector-bool

2017-01-26 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 85967. jbcoe marked 2 inline comments as done. jbcoe added a comment. Responses to some change requests. Input needed on template argument matcher. https://reviews.llvm.org/D29118 Files: clang-tools-extra/clang-tidy/CMakeLists.txt

[PATCH] D29118: [clang-tidy] safety-no-vector-bool

2017-01-26 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: clang-tools-extra/clang-tidy/safety/NoVectorBoolCheck.cpp:50 +diag(MatchedDecl->getLocation(), + " function %0 returns an instance of std::vector") +<< MatchedDecl; djehuti wrote: > JonasToth wrote: >

[PATCH] D26082: Support for Python 3 in libclang python bindings

2016-11-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Thanks Mathieu. Tests ran without issues when I submitted my patch but I tested on macOS. I'll have a look into this and see if I can reproduce the problem. Repository: rL LLVM https://reviews.llvm.org/D26082 ___

[PATCH] D26082: Support for Python 3 in libclang python bindings

2016-12-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Hi Mathieu, What platform did you run the tests on? How did you run them? I don't get any failures when running tests on macOS 10.12.1. command: `env PYTHONPATH=`pwd` LD_LIBRARY_PATH=/Users/jon/DEV/LLVM/build-ninja/lib nosetests-3.4 .` python: Python 3.5.2 (default, Oct

[PATCH] D26082: Support for Python 3 in libclang python bindings

2017-01-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I've reverted this change and submitted https://reviews.llvm.org/D28682 to explicitly check the Python version. I'll pick this up again, I do want Python 3 support. Repository: rL LLVM https://reviews.llvm.org/D26082 ___

[PATCH] D26082: Support for Python 3 in libclang python bindings

2017-01-12 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. @MathieuDuponchelle I've set up a docker image with Fedora 23 and reproduced the errors as you reported. I've no immediate idea what the problem might be. Might be worth looking with address-sanitizer. Repository: rL LLVM https://reviews.llvm.org/D26082

[PATCH] D26082: Support for Python 3 in libclang python bindings

2017-01-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Sadly I can't run valgrind on macOS Sierra. I'll try and look at the effects of bindings/python/clang/cindex.py L181 in more detail today. Just out of curiosity, will you be using the Python 3 bindings for anything? If so what? Repository: rL LLVM

[PATCH] D26082: Support for Python 3 in libclang python bindings

2017-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. @MathieuDuponchelle I'm still keen to get to the bottom of this failure. I've not had time to reproduce it yet. I'm thankful for you taking a look at this and reporting the issue. We need to get this working well for everyone. Repository: rL LLVM

[PATCH] D31128: Rename the safety module to be hicpp

2017-03-19 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: clang-tidy/hicpp/NoAssemblerCheck.cpp:46 + + diag(ASMLocation, "do not use inline assembler in safety-critical code"); +} Should this message use text taken directly from the HICPP rules?

[PATCH] D31128: Rename the safety module to be hicpp

2017-03-19 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a comment. This revision is now accepted and ready to land. LGTM. Great work on getting this module approved by PRQA Aaron. Comment at: clang-tidy/hicpp/NoAssemblerCheck.cpp:46 + + diag(ASMLocation, "do not use inline assembler in

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-16 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I've played around with a few heuristics but it's still far too contentious to have this check on by default and have it warn in places I want warnings. Where should it go? Repository: rL LLVM https://reviews.llvm.org/D30896

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I've run the check on clang. It's noisy (690 warnings). The (few) cases I've manually inspected look like firm candidates for replacing with switches. Not my call though. F3145418: reduced-clang-tidy-switch-checks I'm going to look at

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Quantlib produces no warnings but relies heavily on virtual-dispatch so that may be unsurprising. Repository: rL LLVM https://reviews.llvm.org/D30896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. @Aaron I agree that some instances from your sample would not be improved by a switch. I'll look into narrowing the matched. Repository: rL LLVM https://reviews.llvm.org/D30896 ___

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-16 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I think that clang-tidy allows case-specific subsetting of C++. It is said that C++ contains a beautiful language and I've found that definition of beauty to be very use-case specific. Checks for side-effect free, Haskell-like, functional code would be of enormous

[PATCH] D31568: Add Python 3 support to clang.cindex

2017-04-04 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 94120. jbcoe added a comment. Remove a couple of unnecessary type conversions. Repository: rL LLVM https://reviews.llvm.org/D31568 Files: clang/bindings/python/clang/__init__.py clang/bindings/python/clang/cindex.py

[PATCH] D31568: Add Python 3 support to clang.cindex

2017-04-01 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a project: clang-c. Introduce an interop string to convert from unicode to c-strings where needed. Add missing conversions from _CXString to strings in function registrations. Explicitly evaluate lists where Python 3's lazy iterators would not otherwise

[PATCH] D30773: Make git-clang-format python 3 compatible

2017-04-21 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D30773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31568: Add Python 3 support to clang.cindex

2017-04-20 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300829: Add Python 3 support to clang.cindex (authored by jbcoe). Changed prior to commit: https://reviews.llvm.org/D31568?vs=94120=95918#toc Repository: rL LLVM https://reviews.llvm.org/D31568

[PATCH] D30896: [Clang-tidy] add check misc-prefer-switch-for-enums

2017-03-14 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. @aaron.ballman re: "perhaps the check could be relaxed to only consider cases where you have multiple if/else if clauses". Sadly this does not satisfy my use case where most of the time a single enum value is used. enum class animal_kind { herbivore, carnivore };

[PATCH] D30896: [CLANG-TIDY] add check misc-prefer-switch-for-enums

2017-03-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a project: clang-tools-extra. Herald added subscribers: JDevlieghere, mgorny. Add a check to find enums used in `==` or `!=` expressions. Using a switch statement leads to more easily maintained code. Repository: rL LLVM

[PATCH] D30896: [CLANG-TIDY] add check misc-prefer-switch-for-enums

2017-03-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked 2 inline comments as done. jbcoe added a comment. Handling enum Kind k = Kind::a; if (k == 3) { /* something */ } is intentionally out of scope for now as the author is doing something that I can't trivially replace with a switch. Comment at:

[PATCH] D30896: [CLANG-TIDY] add check misc-prefer-switch-for-enums

2017-03-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 91588. jbcoe added a comment. Minor edits in response to review comments. A few questions outstanding. https://reviews.llvm.org/D30896 Files: clang-tools-extra/clang-tidy/misc/CMakeLists.txt clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp

[PATCH] D34091: Support for querying the exception specification type through libclang

2017-06-27 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL306483: [libclang] Support for querying the exception specification type through… (authored by jbcoe). Changed prior to commit: https://reviews.llvm.org/D34091?vs=102934=104301#toc Repository: rL

[PATCH] D34091: Support for querying the exception specification type through libclang

2017-06-26 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I can merge this for you Andrew. https://reviews.llvm.org/D34091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36953: [libclang] Keep track of TranslationUnit instance when annotating tokens

2017-09-21 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL313913: [libclang] Keep track of TranslationUnit instance when annotating tokens (authored by jbcoe). Changed prior to commit: https://reviews.llvm.org/D36953?vs=111959=116262#toc Repository: rL

[PATCH] D36953: [libclang] Keep track of TranslationUnit instance when annotating tokens

2017-09-21 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Do you need someone to commit this change for you? I'm happy to do so if you don't have commit access. https://reviews.llvm.org/D36953 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36973: [libclang] Add support for querying cursor availability

2017-10-10 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a comment. This revision is now accepted and ready to land. LGTM Would you like me to commit this for you? https://reviews.llvm.org/D36973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36955: [libclang] Visit attributes for function and class templates

2017-10-10 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe accepted this revision. jbcoe added a comment. This revision is now accepted and ready to land. LGTM Would you like me to commit this for you? https://reviews.llvm.org/D36955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36973: [libclang] Add support for querying cursor availability

2017-10-16 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315959: [libclang] Add support for querying cursor availability (authored by jbcoe). Changed prior to commit: https://reviews.llvm.org/D36973?vs=118333=119234#toc Repository: rL LLVM

[PATCH] D36955: [libclang] Visit attributes for function and class templates

2017-10-16 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL315958: [libclang] Visit attributes for function and class templates (authored by jbcoe). Changed prior to commit: https://reviews.llvm.org/D36955?vs=118330=119233#toc Repository: rL LLVM

[PATCH] D36973: [libclang] Add support for querying cursor availability

2017-09-08 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe requested changes to this revision. jbcoe added inline comments. This revision now requires changes to proceed. Comment at: bindings/python/tests/cindex/test_cursor.py:399 +else: +assert False, "Could not find cursor for deleted constructor" +

[PATCH] D37490: Fix __repr__ for Diagnostic in clang.cindex

2017-09-05 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a project: clang-c. Also move misplaced tests for exception specification to fix failing Python tests. Repository: rL LLVM https://reviews.llvm.org/D37490 Files: clang/bindings/python/clang/cindex.py

[PATCH] D37490: Fix __repr__ for Diagnostic in clang.cindex

2017-09-06 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL312622: Fix __repr__ for Diagnostic in clang.cindex (authored by jbcoe). Changed prior to commit: https://reviews.llvm.org/D37490?vs=113896=113966#toc Repository: rL LLVM

[PATCH] D36973: [libclang] Add support for querying cursor availability

2017-09-25 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: bindings/python/tests/cindex/test_cursor.py:407 +# AvailabilityKind.DEPRECATED +tu = get_tu('#include \n void test(char* s) { std::gets(s); }', lang='cpp') +cursor = get_cursor(tu, 'gets') It might be better

[PATCH] D36955: [libclang] Visit attributes for function and class templates

2017-09-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe requested changes to this revision. jbcoe added a comment. This revision now requires changes to proceed. Looks great. Please add tests to clang/tools/c-index-test/c-index-test.c too as the Python tests are not run on build-bots (to the best of my knowledge).

[PATCH] D46383: implementing Cursor.get_included_file in python bindings

2018-05-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I will try to commit this today. Repository: rC Clang https://reviews.llvm.org/D46383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D46383: implementing Cursor.get_included_file in python bindings

2018-05-10 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL332045: implementing Cursor.get_included_file in python bindings (authored by jbcoe, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: include/clang-c/Index.h:4118 + */ +CINDEX_LINKAGE unsigned clang_PrintingPolicy_getIndentation(CXPrintingPolicy); + Could one use an enum to get/set different properties of the policy? ```

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. It might be worth adding some very simple get/set tests to ensure that properties are set as intended. Comment at: tools/libclang/CIndex.cpp:4720 + +#define HANDLE_CASE(P, PROPERTY_NAME) \ + case

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-16 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL322540: [libclang] Add PrintingPolicy for pretty printing declarations (authored by jbcoe, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-15 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I can merge this for you. Please add me as reviewer in any follow-up patches and we can turn them around more quickly. Repository: rC Clang https://reviews.llvm.org/D39903 ___ cfe-commits mailing list

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Looking good, only a few nits. Comment at: tools/libclang/CIndex.cpp:4782 + + return 0; +} Might be worth asserting here. Comment at: unittests/libclang/LibclangTest.cpp:596 +TEST_F(LibclangPrintingPolicyTest,

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-11 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: tools/libclang/libclang.exports:365 +clang_PrintingPolicy_get +clang_PrintingPolicy_set +clang_PrintingPolicy_dispose clang_PrintingPolicy_setProperty and clang_PrintingPolicy_getProperty might be better names (I know

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-13 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added inline comments. Comment at: tools/c-index-test/c-index-test.c:93 +enum CXPrintingPolicyProperty property; + } mappings[] = { + {"CINDEXTEST_PRINTINGPOLICY_INDENTATION", CXPrintingPolicy_Indentation}, I'm not sure that joining the struct

[PATCH] D47864: [python] Fix most Python binding unittests on Windows

2018-06-21 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Would you like me to commit this for you? Repository: rC Clang https://reviews.llvm.org/D47864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D47864: [python] Fix most Python binding unittests on Windows

2018-06-21 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL335282: [bindings] Fix most Python binding unittests on Windows (authored by jbcoe, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D47864 Files:

[PATCH] D51299: [python bindings] Expose template argument API for Type

2018-09-09 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I can commit this. Thanks for the great work! Repository: rC Clang https://reviews.llvm.org/D51299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51299: [python bindings] Expose template argument API for Type

2018-09-11 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC341930: [python bindings] Expose getNumTemplateArguments (authored by jbcoe, committed by ). Changed prior to commit: https://reviews.llvm.org/D51299?vs=162667=164854#toc Repository: rL LLVM

[PATCH] D51299: [python bindings] Expose template argument API for Type

2018-09-11 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL341930: [python bindings] Expose getNumTemplateArguments (authored by jbcoe, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llvm.org/D51299 Files:

[PATCH] D39903: [libclang] Allow pretty printing declarations

2018-01-12 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe requested changes to this revision. jbcoe added inline comments. This revision now requires changes to proceed. Comment at: unittests/libclang/LibclangTest.cpp:596 +TEST_F(LibclangPrintingPolicyTest, GetProperty) { + EXPECT_EQ(2U, clang_PrintingPolicy_getProperty(Policy,

[PATCH] D44217: [clang-tidy] Enable Python 3 support for add_new_check.py

2018-03-07 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: alexfh. Herald added a subscriber: xazax.hun. In Python 3, filters are lazily evaluated and strings are not bytes. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D44217 Files: clang-tools-extra/clang-tidy/add_new_check.py

[PATCH] D44217: [clang-tidy] Enable Python 3 support for add_new_check.py

2018-03-08 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 137646. https://reviews.llvm.org/D44217 Files: clang-tools-extra/clang-tidy/add_new_check.py Index: clang-tools-extra/clang-tidy/add_new_check.py === ---

[PATCH] D42893: [libclang] Add clang_File_tryGetRealPathName

2018-04-07 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I’ll see if I can find a suitable location for a test. Repository: rC Clang https://reviews.llvm.org/D42893 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D42893: [libclang] Add clang_File_tryGetRealPathName

2018-04-07 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Tests for libclang are in clang/unittests/libclang/LibclangTest.cpp Given the surgical nature of this change I hope it will be quick to add a test. Repository: rC Clang https://reviews.llvm.org/D42893 ___ cfe-commits

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE330772: [clang-tidy] Improve bugprone-unused-return-value check (authored by jbcoe, committed by ). Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 Files:

[PATCH] D45891: [clang-tidy] Improve bugprone-unused-return-value check

2018-04-24 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. I can merge this for you. Congratulations on the commit! Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D45891 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45671: [python bindings] Fix Cursor.result_type for ObjC method declarations - Bug 36677

2018-04-22 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe added a comment. Congrats on your first patch! I can commit this for you. Repository: rC Clang https://reviews.llvm.org/D45671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45671: [python bindings] Fix Cursor.result_type for ObjC method declarations - Bug 36677

2018-04-22 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330557: [python bindings] Fix Cursor.result_type for ObjC method declarations - Bug… (authored by jbcoe, committed by ). Repository: rL LLVM https://reviews.llvm.org/D45671 Files:

[PATCH] D42893: [libclang] Add clang_File_tryGetRealPathName

2018-03-31 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe requested changes to this revision. jbcoe added a comment. This revision now requires changes to proceed. Can you add some simple tests? Repository: rC Clang https://reviews.llvm.org/D42893 ___ cfe-commits mailing list

[PATCH] D44217: [clang-tidy] Enable Python 3 support for add_new_check.py

2018-03-24 Thread Jonathan B Coe via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL328418: [clang-tidy] Enable Python 3 support for add_new_check.py (authored by jbcoe, committed by ). Herald added subscribers: llvm-commits, klimek. Changed prior to commit:

[PATCH] D75006: [clang-format] Wrap lines for C# property accessors

2020-02-24 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 246235. jbcoe added a comment. This revision is now accepted and ready to land. Simplify logic for merging property accessors CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75006/new/ https://reviews.llvm.org/D75006 Files:

[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247399. jbcoe added a comment. Fix failing test by parsing tokens after '?[' in the same way as tokens after '['. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75368/new/ https://reviews.llvm.org/D75368 Files:

[PATCH] D75606: [clang-format] Improve identification of C# nullables

2020-03-04 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Consider `? identifier =` and `? identifier;` to be nullable within function bodies. Repository: rG LLVM Github Monorepo

[PATCH] D75606: [clang-format] Improve identification of C# nullables

2020-03-04 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 248232. jbcoe marked an inline comment as done. jbcoe added a comment. Remove duplicate check following review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75606/new/ https://reviews.llvm.org/D75606 Files:

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247643. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75456/new/ https://reviews.llvm.org/D75456 Files: clang/lib/Format/FormatToken.h clang/lib/Format/FormatTokenLexer.cpp clang/lib/Format/TokenAnnotator.cpp

[PATCH] D75456: [clang-format] Rename CSharpNullConditionalSq and add missing test

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Rename CSharpNullConditionalSq to CSharpNullConditionalLSquare. Add test for spaces inside [] with C# Null conditionals.

[PATCH] D75455: [clang-format] Allow nested [] in C# attributes

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Keep track of unpaired [] when identifying C# attribute lines Repository: rG LLVM Github Monorepo

[PATCH] D75368: [clang-format] Handle ?. ?? and ?[ as C# tokens

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. Handle ??, ?. and ?[ in lib/Format/FormatTokenLexer. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75368/new/ https://reviews.llvm.org/D75368 ___ cfe-commits mailing list

[PATCH] D75368: [clang-format] Handle NullCoalescing and NullConditional operators in C#

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247610. jbcoe edited the summary of this revision. jbcoe added a comment. Do not add new punctuators for ??, ?. and ?[ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75368/new/ https://reviews.llvm.org/D75368 Files: clang/lib/Format/FormatToken.h

[PATCH] D75517: [clang-format] Do not format C# array subscript operators as attributes

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Fix misidentification of C# array subscript operators. Repository: rG LLVM Github Monorepo

[PATCH] D75465: [clang-format] Do not merge target-name and : for C# attributes

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Re-use token type `TT_AttributeColon` for C# attribute target colons. Repository: rG LLVM Github Monorepo

[PATCH] D75473: [clang-format] parse C# object initialisers

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/lib/Format/UnwrappedLineParser.cpp:1978 + if (FormatTok->is(tok::l_paren)) +parseParens(); + krasimir wrote: > I don't understand why this is needed, and removing

[PATCH] D75473: [clang-format] parse C# object initialisers

2020-03-03 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 248039. jbcoe added a comment. Remove code without test coverage. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75473/new/ https://reviews.llvm.org/D75473 Files: clang/lib/Format/UnwrappedLineParser.cpp

[PATCH] D75473: [clang-format] parse C# object initialisers

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Treat C# object initializers as braced lists. Allow lambdas inside C# braced lists. Repository: rG LLVM Github Monorepo

[PATCH] D75194: [clang-format] Do not merge very long C# automatic properties

2020-03-02 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. I will try to handle this in unwrapped line parser. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75194/new/ https://reviews.llvm.org/D75194

[PATCH] D75336: [clang-format] Improve C# handling of spaces in square brackets

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added reviewers: MyDeveloperDay, krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75336 Files:

[PATCH] D75194: [clang-format] Do not merge very long C# automatic properties

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/lib/Format/UnwrappedLineFormatter.cpp:489 +// If the Limit is broken, split the default value onto a new line and +// indent it. +// krasimir wrote: > Why not

[PATCH] D75244: [clang-format] Recognize C# named argument colons as a token type

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 246924. jbcoe added a comment. Consolidate if blocks following review comment. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75244/new/ https://reviews.llvm.org/D75244 Files: clang/lib/Format/FormatToken.h clang/lib/Format/FormatTokenLexer.cpp

[PATCH] D75244: [clang-format] Recognize C# named argument colons as a token type

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. No longer merge 'name' and ':' into a single token. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D75244

[PATCH] D75261: [clang-format] Recognize C# nullable types

2020-02-28 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe updated this revision to Diff 247193. jbcoe added a comment. Add additional test following review discussion CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75261/new/ https://reviews.llvm.org/D75261 Files: clang/lib/Format/FormatToken.h clang/lib/Format/TokenAnnotator.cpp

[PATCH] D75261: [clang-format] Recognize C# nullable types

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe marked an inline comment as done. jbcoe added inline comments. Comment at: clang/unittests/Format/FormatTestCSharp.cpp:178 verifyFormat( - "public Person(string firstName, string lastName, int? age=null)"); + "public Person(string firstName, string lastName,

[PATCH] D75261: [clang-format] Recognize C# nullable types

2020-02-27 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. Do not confuse C# nullable types with conditional expressions. Do not put a space before the `?` in `[access-modifier] Type?

[PATCH] D75731: [clang-format] C# does not indent braced initializers as continuations

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. C# treats object initializers as braced init blocks. Braced init blocks are no longer indented as continuations.

[PATCH] D75747: [clang-format] Correct indentation for `[key] = value,` entries in C++ object initialisers

2020-03-06 Thread Jonathan B Coe via Phabricator via cfe-commits
jbcoe created this revision. jbcoe added a reviewer: krasimir. jbcoe added a project: clang-format. Herald added a project: clang. Herald added a subscriber: cfe-commits. jbcoe added a comment. Requires https://reviews.llvm.org/D75731 to be merged first. Do not use continuation indent for '['

  1   2   >