Page MenuHomePhabricator
Feed Advanced Search

Today

aaron.ballman committed rGd4a1c3bb5a1b: Add test cases for dumping AST function decl nodes to JSON; NFC. (authored by aaron.ballman).
Add test cases for dumping AST function decl nodes to JSON; NFC.
Tue, Jun 18, 10:54 AM
aaron.ballman committed rG3559d2224ee4: Add test cases for dumping AST decl nodes to JSON; NFC. (authored by aaron.ballman).
Add test cases for dumping AST decl nodes to JSON; NFC.
Tue, Jun 18, 9:36 AM
aaron.ballman added a comment to D62952: [analyzer][tests] Use normalize_sarif in place of diff_sarif.

But is there a reason to not keep %diff_sarif and define it in terms of %normalize_sarif | diff -U1 -b within lit.local.cfg? I guess I don't see the benefit to exposing the call to diff (I don't anticipate anyone needing to change the options passed to diff).

Yes: The normalization runs on stdin. %diff_sarif would then only make sense if stdin is one of the inputs, and I think the only input we can hardcode to be stdin is the one conventionally considered to be the reference input (which is not what we want).

Tue, Jun 18, 9:22 AM · Restricted Project
aaron.ballman added a comment to D62952: [analyzer][tests] Use normalize_sarif in place of diff_sarif.

In general, that seems reasonable, but I would prefer to take care of more of the work in lit.local.cfg than have to deal with that atrocious RUN line in every test case. Is there a way to retain a similarly succinct solution as diff_sarif?

There'd be no atrocious RUN line if we went with modifying the expected files beforehand and having the tool output a newline.

The unchanged:

// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify -analyzer-output=sarif -o - | %diff_sarif %S/Inputs/expected-sarif/sarif-diagnostics-taint-test.c.sarif -

becomes:

// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.security.taint,debug.TaintTest %s -verify -analyzer-output=sarif -o - | %normalize_sarif | diff -U1 -b %S/Inputs/expected-sarif/sarif-diagnostics-taint-test.c.sarif -

As in, %diff_sarif gets replaced with %normalize_sarif | diff -U1 -b and that's it.

Tue, Jun 18, 8:56 AM · Restricted Project
aaron.ballman added a reviewer for D63451: P0840R2: support for [[no_unique_address]] attribute: aaron.ballman.

Can you also add some SemaCXX tests that ensure the attribute is properly diagnosed when written on a bit-field, a static data member, a function, is given an argument, etc?

Tue, Jun 18, 8:15 AM · Restricted Project
aaron.ballman accepted D63088: [clang-tidy] misc-unused-parameters: don't comment out parameter name for C code.

Funny enough, I've got a paper out for WG14 to try to relax this for C2x: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2381.pdf

Tue, Jun 18, 7:50 AM · Restricted Project
aaron.ballman added a comment to D63299: [Clang] Parse GNU fallthrough attributes.

Ok, If we peek a few tokens ahead and check attribute if it is stmt attribute and then we call MaybeParseGNUAttr - this probably would work but are you fine with it as a workaround ?

Tue, Jun 18, 7:39 AM · Restricted Project
aaron.ballman accepted D59402: Suggestions to fix -Wmissing-{prototypes,variable-declarations}.

LGTM!

Tue, Jun 18, 7:22 AM · Restricted Project
aaron.ballman added a comment to D62952: [analyzer][tests] Use normalize_sarif in place of diff_sarif.

@aaron.ballman, for similar cases in the plist output, it has been proposed

  • that the reference expected file be committed into the tree pre-normalized, and
  • that tool be modified such that the output file has a newline at the end of the file.

    Does that sound good for this format?
Tue, Jun 18, 7:14 AM · Restricted Project
aaron.ballman added a comment to D60455: [SYCL] Implement SYCL device code outlining.

Most of the comments are about minor nits like grammar and coding conventions, but I did have some questions regarding what kinds of functions the sycl_kernel attribute gets applied to. Also, I'd like to see some additional tests that demonstrate the sycl device attribute is being implicitly created on the proper declarations as expected (can probably do that using -ast-dump and checking to see if the right functions have the attribute attached).

Tue, Jun 18, 7:04 AM · Restricted Project
aaron.ballman created D63490: Script for generating AST JSON dump test cases.
Tue, Jun 18, 6:24 AM
aaron.ballman committed rG7a89909c8427: Require commas to separate multiple GNU-style attributes in the same attribute… (authored by aaron.ballman).
Require commas to separate multiple GNU-style attributes in the same attribute…
Tue, Jun 18, 5:55 AM
aaron.ballman added inline comments to D63299: [Clang] Parse GNU fallthrough attributes.
Tue, Jun 18, 4:24 AM · Restricted Project

Yesterday

aaron.ballman added inline comments to D63082: [Diagnostics] Added support for -Wint-in-bool-context.
Mon, Jun 17, 12:47 PM · Restricted Project
aaron.ballman added inline comments to D59402: Suggestions to fix -Wmissing-{prototypes,variable-declarations}.
Mon, Jun 17, 12:24 PM · Restricted Project
aaron.ballman added inline comments to D63260: [Attr] Support _attribute__ ((fallthrough)).
Mon, Jun 17, 12:16 PM · Restricted Project
aaron.ballman added inline comments to D62750: Show note for -Wmissing-prototypes for functions with parameters.
Mon, Jun 17, 12:09 PM · Restricted Project
aaron.ballman added inline comments to D63139: [Diagnostics] Implement -Wswitch-unreachable.
Mon, Jun 17, 10:56 AM · Restricted Project
aaron.ballman accepted D62750: Show note for -Wmissing-prototypes for functions with parameters.

LGTM!

Mon, Jun 17, 10:42 AM · Restricted Project
aaron.ballman accepted D57086: Ignore trailing NullStmts in StmtExprs for GCC compatibility.

Sorry I it's taken me a while to get back to this work. I've rebased the changes and taken advantage of the refactoring to stop modifying the CompoundStmt after creating it. This definitely simplified the changes required in Stmt.h, which is nice.

I've addressed the the need to update the TreeTransformer for the template case, and added a test case for that.

Mon, Jun 17, 9:30 AM
aaron.ballman accepted D63039: Various improvements to Clang MSVC Visualizers.

LGTM! Thank you for the fixes, Mike!

Mon, Jun 17, 8:49 AM · Restricted Project, Restricted Project
aaron.ballman added reviewers for D62571: Implement codegen for MSVC unions with reference members: rnk, majnemer.

This looks reasonable to me, but @rnk and @majnemer may have opinions as well.

Mon, Jun 17, 8:43 AM · Restricted Project
aaron.ballman added a comment to D61552: [clang] Adapt ASTMatcher to explicit(bool) specifier.

i didn't manage to get "clang/docs/tools/dump_ast_matchers.py" to work. it keep failing to parse and generating empty files as a result.

Mon, Jun 17, 8:42 AM · Restricted Project
aaron.ballman added inline comments to D59402: Suggestions to fix -Wmissing-{prototypes,variable-declarations}.
Mon, Jun 17, 8:10 AM · Restricted Project

Sat, Jun 1

aaron.ballman added a comment to D54258: [Clang] Fix pretty printing of CUDA address spaces.

Do you know when this will be merged?

Sat, Jun 1, 11:19 AM · Restricted Project, Restricted Project

Thu, May 30

aaron.ballman accepted D62435: Add Attribute NoThrow as an Exception Specifier Type.

LGTM aside from some minor nits.

Thu, May 30, 9:14 AM · Restricted Project, Restricted Project

Mon, May 27

aaron.ballman accepted D62470: Clarify when fix-it hints on warnings are appropriate.

LGTM!

Mon, May 27, 6:11 PM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D62470: Clarify when fix-it hints on warnings are appropriate.
Mon, May 27, 12:21 PM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D62435: Add Attribute NoThrow as an Exception Specifier Type.
Mon, May 27, 10:48 AM · Restricted Project, Restricted Project
aaron.ballman requested changes to D62437: [clang-tidy] Splits fuchsia-default-arguments.

It seems that the functional changes are missing from the patch -- all I see are formatting changes; have I missed something?

Mon, May 27, 8:07 AM · Restricted Project, Restricted Project, Restricted Project
aaron.ballman added inline comments to D62435: Add Attribute NoThrow as an Exception Specifier Type.
Mon, May 27, 7:59 AM · Restricted Project, Restricted Project
aaron.ballman added a comment to D62470: Clarify when fix-it hints on warnings are appropriate.

Thank you for working on this!

Mon, May 27, 7:52 AM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D60543: [clang] Update isDerivedFrom to support Objective-C classes 🔍.
Mon, May 27, 7:47 AM · Restricted Project
aaron.ballman committed rGe091ab1b2df7: When dumping the AST to JSON, dump the type information from a typeid… (authored by aaron.ballman).
When dumping the AST to JSON, dump the type information from a typeid…
Mon, May 27, 7:36 AM
aaron.ballman accepted D62404: [clang-tidy] Fix null pointer dereference in readability-identifier-naming.

LGTM!

Mon, May 27, 7:36 AM · Restricted Project, Restricted Project, Restricted Project
aaron.ballman committed rG1b0ae8f05f1a: When dumping the AST to JSON, dump whether a function is variadic or not. (authored by aaron.ballman).
When dumping the AST to JSON, dump whether a function is variadic or not.
Mon, May 27, 7:27 AM
aaron.ballman committed rGe7b3b80fb125: When dumping the AST to JSON, dump the declared name of a MemberExpr operand. (authored by aaron.ballman).
When dumping the AST to JSON, dump the declared name of a MemberExpr operand.
Mon, May 27, 7:25 AM
aaron.ballman committed rGbcc0cedf7705: When dumping the AST to JSON, dump the argument name to a sizeof pack… (authored by aaron.ballman).
When dumping the AST to JSON, dump the argument name to a sizeof pack…
Mon, May 27, 7:17 AM
aaron.ballman committed rG80d5d168fdcc: Add test cases for dumping AST expression nodes to JSON; NFC. (authored by aaron.ballman).
Add test cases for dumping AST expression nodes to JSON; NFC.
Mon, May 27, 7:10 AM

Fri, May 24

aaron.ballman committed rG4934f95000d8: Adding an explicit triple to this test to appease build bots. (authored by aaron.ballman).
Adding an explicit triple to this test to appease build bots.
Fri, May 24, 12:17 PM
aaron.ballman committed rGfa643d70714a: Add JSON dumping tests for ObjC statements; add support for dumping @catch… (authored by aaron.ballman).
Add JSON dumping tests for ObjC statements; add support for dumping @catch…
Fri, May 24, 11:56 AM
aaron.ballman added a comment to D62404: [clang-tidy] Fix null pointer dereference in readability-identifier-naming.

I haven't yet been able to figure out how to properly add a test for this bug, since the expected result is a failure to compile while the current test/clang-tidy/readability-identifier-naming.cpp must compile to pass.

Any suggestions?

Fri, May 24, 11:22 AM · Restricted Project, Restricted Project, Restricted Project
aaron.ballman added a comment to D59402: Suggestions to fix -Wmissing-{prototypes,variable-declarations}.

I guess you're referring to "[fix-it hints] should only be used when it’s very likely they match the user’s intent".

Fri, May 24, 11:16 AM · Restricted Project
aaron.ballman committed rG4105882b87e5: Add support for dumping Objective C AST declaration nodes to JSON. (authored by aaron.ballman).
Add support for dumping Objective C AST declaration nodes to JSON.
Fri, May 24, 10:38 AM
aaron.ballman added a comment to D62369: [ADT] Enable set_difference() to be used on StringSet.

For my part, this seems reasonable to me.

Fri, May 24, 6:06 AM · Restricted Project
aaron.ballman accepted D59402: Suggestions to fix -Wmissing-{prototypes,variable-declarations}.

My only real concern about this is that sometimes the fix-it will be wrong because the issue is a typo in the definition. However, it seems like that could be handled by preferring typo correction when the edit distance is below a certain threshold or something along those lines, and could be done later.

Fri, May 24, 5:33 AM · Restricted Project

Thu, May 23

aaron.ballman accepted D59628: Add support for __attribute__((objc_class_stub)).

LGTM!

Thu, May 23, 7:57 AM · Restricted Project

Wed, May 22

aaron.ballman accepted D61509: [OpenMP] Set pragma start loc to `#pragma` loc.

The overall vote seems to be that this patch is ready to push, and we/I should work on other pragmas soon after. I'm also happy to wait for more comments if people want more time.

Wed, May 22, 12:03 PM · Restricted Project, Restricted Project
aaron.ballman added a comment to D61509: [OpenMP] Set pragma start loc to `#pragma` loc.

Now that D61643 is pushed, we're back to this patch. My recollection is there are two remaining issues:

  1. Should we store both the #pragma location and the omp location in the AST, or is it fine to just replace the latter location with the former? If we choose to store both, we still haven't settled on an implementation, which likely will involve non-trivial changes in the parser and the AST. For OpenMP, @ABataev said replacing should be fine.
Wed, May 22, 11:18 AM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D61508: [clang-tidy] bugprone-header-guard : a simple version of llvm-header-guard.
Wed, May 22, 6:38 AM · Restricted Project, Restricted Project
aaron.ballman committed rG4c9e1d22620f: Clang-formatting the header in advance of other planned changes; NFC. (authored by aaron.ballman).
Clang-formatting the header in advance of other planned changes; NFC.
Wed, May 22, 5:59 AM

Tue, May 21

aaron.ballman committed rGb0573608b0a3: Rename identifiers to spell out analyze; NFC. (authored by aaron.ballman).
Rename identifiers to spell out analyze; NFC.
Tue, May 21, 3:42 PM
aaron.ballman committed rG31ca49be4708: Do not use the incorrect attribute spelling list index when translating a… (authored by aaron.ballman).
Do not use the incorrect attribute spelling list index when translating a…
Tue, May 21, 10:23 AM
aaron.ballman accepted D61643: [PragmaHandler] Expose `#pragma` location.

LGTM!

Tue, May 21, 7:55 AM · Restricted Project
aaron.ballman accepted D62192: [clang-tidy]: Add cert-oop54-cpp alias for bugprone-unhandled-self-assignment.

LGTM aside from some nits, thank you for this!

Tue, May 21, 7:49 AM · Restricted Project
aaron.ballman committed rG86abee8185c1: Add support for dumping AST comment nodes to JSON. (authored by aaron.ballman).
Add support for dumping AST comment nodes to JSON.
Tue, May 21, 7:37 AM
aaron.ballman added a comment to D61508: [clang-tidy] bugprone-header-guard : a simple version of llvm-header-guard.

Latest change addresses most of issues.
Outstanding is adding a test when garbage GuardStyle value is fed into config.
The trial testcase used only CHECK-*-NOT which caused complaining from test harness looking for the CHECK- cases.
Looking for something similar in the other checker tests did not turn up anything.
In general it seems like clang-tidy assumes developers get the string names of the options and their values correct and does not provide a lot of (any?) checking.

Tue, May 21, 5:12 AM · Restricted Project, Restricted Project

Mon, May 20

aaron.ballman added a comment to D62056: Use ASTDumper to dump the AST from clang-query.

If you wanted to expand test coverage for the changes covered in this, that would be a good thing. However, I'm not certain how testable the newly colorized output is, which is why this LG as-is.

Mon, May 20, 1:44 PM · Restricted Project
aaron.ballman added inline comments to D62065: Move dump method implementations to their respective class files.
Mon, May 20, 1:39 PM · Restricted Project
aaron.ballman accepted D62056: Use ASTDumper to dump the AST from clang-query.

LGTM

Mon, May 20, 1:39 PM · Restricted Project
aaron.ballman committed rG4aee1b5b0b9a: Add more tests for AST JSON output; NFC. (authored by aaron.ballman).
Add more tests for AST JSON output; NFC.
Mon, May 20, 1:00 PM
aaron.ballman committed rG4d05a974b7f1: Dump macro expansion information as needed when outputting the AST to JSON. (authored by aaron.ballman).
Dump macro expansion information as needed when outputting the AST to JSON.
Mon, May 20, 9:46 AM
aaron.ballman accepted D61851: [clang-tidy] New option for misc-throw-by-value-catch-by-reference.

LGTM (with the typo fix).

Mon, May 20, 7:05 AM · Restricted Project, Restricted Project, Restricted Project

May 17 2019

aaron.ballman committed rGbbfd8d188570: Add more tests for AST JSON output; NFC. (authored by aaron.ballman).
Add more tests for AST JSON output; NFC.
May 17 2019, 12:12 PM
aaron.ballman added inline comments to D61508: [clang-tidy] bugprone-header-guard : a simple version of llvm-header-guard.
May 17 2019, 7:02 AM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser.
May 17 2019, 7:02 AM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D59628: Add support for __attribute__((objc_class_stub)).
May 17 2019, 6:45 AM · Restricted Project
aaron.ballman accepted D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser.

What will be making use of/testing this new functionality?

Any code which has a DynTypedNode and wishes to traverse it.

I envisage this as a more-flexible DynTypedNode::dump that the user does not have to implement themselves in order to use the ASTNodeTraverser.

Do we currently have any such code that's using this functionality, though? I'm mostly concerned that this is dead code with no testing, currently. The functionality itself seems reasonable enough and the code looks correct enough, so if this is part of a series of planned changes, that'd be good information to have for the review.

Ah, yes. This is supposed to be 'useful public API' like the other Visit methods for use inside and outside the codebase. A follow-up patch will use it, but it's provided for external use too anyway.

I'll add a unit test.

May 17 2019, 6:38 AM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D61837: Make it possible control matcher traversal kind with ASTContext.
May 17 2019, 6:23 AM · Restricted Project
aaron.ballman accepted D61835: Extract ASTDumper to a header file.
  1. Anyone who wants traversal in the same way that dumping is done and who needs to call API on the instance which is provided by ASTNodeTraverser (which ASTDumper inherits) needs to use ASTDumper. For example my UI. See my EuroLLVM talk for more: https://steveire.wordpress.com/2019/04/30/the-future-of-ast-matching-refactoring-tools-eurollvm-and-accu/

Do they? Why is the ASTNodeTraverser insufficient?

It doesn't have the same behavior as ASTDumper, because ASTDumper "overrides" some Visit metthods.

I'm aware that they're different, but I may not have been sufficiently clear. I'm saying that the only public APIs I think a user should be calling are inherited from ASTNodeTraverser and not ASTDumper, so it is not required to expose ASTDumper directly, only a way to get an ASTNodeTraverser reference/pointer to an ASTDumper instance so that you get the correct virtual dispatch. e.g., ASTNodeTraverser *getSomethingThatActsLikeAnASTDumper() { return new ASTDumper; }

Perhaps. One way to implement the 'less noise' version of AST output (ie removing pointer addresses etc http://ce.steveire.com/z/HaCLeO ) is to make it an API on the TextNodeDumper. Then ASTDumper would need a forwarding API for it.

Anyway, your argument also applies to JSONNodeDumper, but you put that in a header file.

May 17 2019, 5:57 AM · Restricted Project

May 16 2019

aaron.ballman added inline comments to D61837: Make it possible control matcher traversal kind with ASTContext.
May 16 2019, 12:56 PM · Restricted Project
aaron.ballman added a comment to D61835: Extract ASTDumper to a header file.
  1. Anyone who wants traversal in the same way that dumping is done and who needs to call API on the instance which is provided by ASTNodeTraverser (which ASTDumper inherits) needs to use ASTDumper. For example my UI. See my EuroLLVM talk for more: https://steveire.wordpress.com/2019/04/30/the-future-of-ast-matching-refactoring-tools-eurollvm-and-accu/

Do they? Why is the ASTNodeTraverser insufficient?

It doesn't have the same behavior as ASTDumper, because ASTDumper "overrides" some Visit metthods.

May 16 2019, 12:36 PM · Restricted Project
aaron.ballman added inline comments to D61837: Make it possible control matcher traversal kind with ASTContext.
May 16 2019, 12:00 PM · Restricted Project
aaron.ballman added a comment to D61835: Extract ASTDumper to a header file.

The users of the follow-up patch https://reviews.llvm.org/D61837#change-x5mxz9Lpijjs need that 'correctness', but also need the public API from ASTNodeTraverser on the instance. (That patch also extends the public API for users).

I don't see anything in the follow-up patch that actually uses the ASTDumper class though, so I'm still a bit confused.

Maybe my wording was confusing. I'll try again:

  1. Anyone who wants traversal in the same way that dumping is done must use an instance of the ASTDumper class. Is that much clear? Does my previous response clarify why that is the case?
May 16 2019, 11:54 AM · Restricted Project
aaron.ballman added a comment to D61835: Extract ASTDumper to a header file.

I'm not certain where you're planning to go with this change (or is this the only change you're trying to make in this area?), so it's a bit hard to evaluate this patch. Can you explain a bit more about what you're ultimately trying to accomplish?

It might help if I had a better idea of which APIs you thought were ones that would help users (because my only real concern with this change is that the public interface for this class is rather unpleasant).

The reason the ASTDumper class still exists (for the purpose of dumping an AST to stream at least) is that it dumps the {Function,Var,Class}TemplateDecl 'correctly'.

May 16 2019, 11:34 AM · Restricted Project
aaron.ballman added a comment to D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser.

What will be making use of/testing this new functionality?

Any code which has a DynTypedNode and wishes to traverse it.

I envisage this as a more-flexible DynTypedNode::dump that the user does not have to implement themselves in order to use the ASTNodeTraverser.

May 16 2019, 11:27 AM · Restricted Project, Restricted Project
aaron.ballman accepted D61836: Move TraversalKind enum to ast_type_traits.

LGTM aside from some commenting requests.

May 16 2019, 7:40 AM · Restricted Project
aaron.ballman added a comment to D61837: Make it possible control matcher traversal kind with ASTContext.

Thanks for this -- it looks like really interesting functionality! I've mostly found nits thus far, but did have a question about clang-query support for it.

May 16 2019, 7:36 AM · Restricted Project
aaron.ballman added a comment to D61834: Add a Visit overload for DynTypedNode to ASTNodeTraverser.

What will be making use of/testing this new functionality?

May 16 2019, 6:01 AM · Restricted Project, Restricted Project
aaron.ballman added a comment to D61835: Extract ASTDumper to a header file.

I'm not certain where you're planning to go with this change (or is this the only change you're trying to make in this area?), so it's a bit hard to evaluate this patch. Can you explain a bit more about what you're ultimately trying to accomplish?

May 16 2019, 5:56 AM · Restricted Project

May 14 2019

aaron.ballman accepted D61874: [clang-tidy] Fix invalid fixit for readability-static-accessed-through-instance (bug 40544).

LGTM!

May 14 2019, 5:48 AM · Restricted Project, Restricted Project, Restricted Project
aaron.ballman committed rGd06f3917913d: Add a new language mode for C2x; enable [[attribute]] support by default in C2x. (authored by aaron.ballman).
Add a new language mode for C2x; enable [[attribute]] support by default in C2x.
May 14 2019, 5:08 AM
aaron.ballman closed D61370: Add a C2x mode and allow attributes in it.

I've commit in r360667, thanks!

May 14 2019, 5:07 AM

May 13 2019

aaron.ballman committed rG3fdd2b1bd2da: Removing an unused member variable; NFC. (authored by aaron.ballman).
Removing an unused member variable; NFC.
May 13 2019, 3:29 PM
aaron.ballman closed D60910: [WIP] Dumping the AST to JSON.

Commit in r360622.

May 13 2019, 2:44 PM
aaron.ballman committed rG2ce598a44a35: Introduce the ability to dump the AST to JSON. (authored by aaron.ballman).
Introduce the ability to dump the AST to JSON.
May 13 2019, 2:38 PM
aaron.ballman added a comment to D60910: [WIP] Dumping the AST to JSON.

If you're happy with these two conditions, then I have no concerns with this moving forward:

  • There is no implied stability for the content or format of the dump between major releases, other than that it be valid JSON; this should be stated explicitly in the documentation. (Compatibility between patch releases seems like something we can work out with the release manager, but I'm inclined to say we should make a best-effort attempt to preserve it.) If people want to build tools on this rather than on one of our stable APIs, they should expect to be broken in some way on every major release.
  • There is no requirement for people maintaining the AST (changing or adding AST nodes) to update the dump output for modified AST nodes to show any new information -- unlike the existing -ast-dump, this is not just for debugging, but we should be able to treat it as if it were. Perhaps a better way to put it: there is no requirement that the information in this dump is complete, but the information that is dumped should be correct.

    If you want stronger guarantees than that, then we should have a broader discussion to establish some community buy-in.
May 13 2019, 1:33 PM
aaron.ballman updated the diff for D60910: [WIP] Dumping the AST to JSON.

Switched to using the JSON streaming interface rather than a custom solution
Updated the test cases for the new formatting

May 13 2019, 1:27 PM
aaron.ballman added a comment to D61370: Add a C2x mode and allow attributes in it.

Ping x2.

May 13 2019, 1:04 PM
aaron.ballman accepted D61619: Make language option `GNUAsm` discoverable with `__has_extension` macro..

LGTM!

May 13 2019, 12:50 PM · Restricted Project
aaron.ballman added a comment to D24892: [clang-tidy] Add option "LiteralInitializers" to cppcoreguidelines-pro-type-member-init.

Do I wait for @alexfh to turn his red into a green, too?

May 13 2019, 12:45 PM · Restricted Project, Restricted Project
aaron.ballman added inline comments to D61851: [clang-tidy] New option for misc-throw-by-value-catch-by-reference.
May 13 2019, 12:42 PM · Restricted Project, Restricted Project, Restricted Project
aaron.ballman added reviewers for D60543: [clang] Update isDerivedFrom to support Objective-C classes 🔍: klimek, alexfh.

Adding some more AST matcher reviewers to see if there are other options that we've not considered.

May 13 2019, 9:04 AM · Restricted Project
aaron.ballman added a comment to D60543: [clang] Update isDerivedFrom to support Objective-C classes 🔍.

I did some digging and I believe there are two approaches that we can take to extend isDerivedFrom to support Objective-C classes.

Option 1: Match on Common Ancestor Declaration Type:
Convert isDerivedFrom to match on the common ancestor declaration type, NamedDecl, and return false for
declaration types other than CXXRecordDecl and ObjCInterfaceDecl.

Advantages:
• Largely works in-place without requiring major changes to matchers built on top of isDerivedFrom.

Disadvantages:
• Allows nonsensical matchers, e.g., functionDecl(isDerivedFrom("X")).

Option 2: Convert to Polymorphic Matcher:
Convert isDerivedFrom to a polymorphic matcher supporting CXXRecordDecl and ObjCInterfaceDecl.

Advantages:
• Restricts usage of isDerivedFrom to CXXRecordDecl and ObjCInterfaceDecl.

Disadvantages:
• Potentially requires many or all matchers using isDerivedFrom to refactor to adapt to the polymorphic matcher interface.

Evaluation
I have been going back and forth as to which approach is superior. Option 1 promotes source stability at the cost of usability while
option 2 seems to promote usability at the cost of source stability. I exported a portrayal of option 1 for consideration as it
required less invasive changes. I can see arguments supporting both approaches.

What do you think? Which of the two approaches do you think we should go with? Is there another approach that I have not thought of?

May 13 2019, 9:02 AM · Restricted Project

May 10 2019

aaron.ballman committed rGcc55804be050: Removing an unused member variable; NFC. (authored by aaron.ballman).
Removing an unused member variable; NFC.
May 10 2019, 11:27 AM
aaron.ballman accepted D61700: [clang-tidy] readability-redundant-declaration: fix false positive with C "extern inline".

LGTM with some testing nits.

May 10 2019, 9:30 AM · Restricted Project, Restricted Project
aaron.ballman closed D56160: [clang-tidy] modernize-use-trailing-return-type check.
  • fixed formatting
  • fixed function names in tests
  • added -fexceptions to test arguments
  • fixed typo in release notes
May 10 2019, 9:26 AM · Restricted Project
aaron.ballman committed rG61c0daa0076e: Recommit r360345 with fixes (was reverted in r360348). (authored by aaron.ballman).
Recommit r360345 with fixes (was reverted in r360348).
May 10 2019, 9:24 AM

May 9 2019

aaron.ballman reopened D56160: [clang-tidy] modernize-use-trailing-return-type check.

@aaron.ballman I do not have commit privileges and I would be very thankful, if you could commit this patch for me! Thank you!

I've commit for you in r360345, thank you for the patch!

May 9 2019, 8:06 AM · Restricted Project
aaron.ballman committed rG0268083329c3: Revert r360345 and r360346, as they are not passing the testbots. (authored by aaron.ballman).
Revert r360345 and r360346, as they are not passing the testbots.
May 9 2019, 8:05 AM