aaron.ballman (Aaron Ballman)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 14 2013, 3:16 PM (266 w, 3 d)

Recent Activity

Thu, Apr 19

aaron.ballman added a comment to D45835: Add new driver mode for dumping compiler options.

The list of features/extensions seems okay; it's information which is already available through a stable interface (specifically, clang -E). JSON also seems fine as a representation.

Including the language/codegen/etc. options as-is doesn't make sense; we can, and often do, change the internal representation of the option structs. If the information is useful, we should provide a stable interface.

Thu, Apr 19, 1:15 PM
aaron.ballman created D45835: Add new driver mode for dumping compiler options.
Thu, Apr 19, 12:20 PM

Tue, Apr 17

aaron.ballman added a comment to D45702: [clang-tidy] Add a new check, readability-redundant-data-call, that finds and removes redundant calls to .data()..

Have you run this over any large code bases to see whether the check triggers in practice?

Tue, Apr 17, 11:50 AM · Restricted Project
aaron.ballman added inline comments to D45601: Warn on bool* to bool conversion.
Tue, Apr 17, 11:27 AM
aaron.ballman added a comment to D41648: [clang-tidy] implement cppcoreguidelines macro rules.

I checked several codebases and implemented a little helper script to see which kind of macros exist. Then I added some filter regex as configuration and tried again, here are the results:

For https://github.com/nlohmann/json which is a very high quality codebase, the results were as expected: very clean, and good macro usage: (except a #define private public for tests)

Filter: JSON*|NLOHMANN*

CMake on the other hand uses many macros and don't obey CAPS_ONLY rules for all macros.

Filter: _FILE_OFFSET_BITS|AE_*|ARCHIVE_*|cal_*|CMAKE_*|cm*|CM_*|CPP_*|CURL*|E_*|exp_*|F90*|jp*|JSON_*|KW*|kw*|O_*|REQ_*|UV_*|YY*|yy*|Z_*

Tue, Apr 17, 7:45 AM
aaron.ballman closed D45615: [builtins] __builtin_dump_struct : added more types format.

Committed in r330188, thank you for the patch!

Tue, Apr 17, 7:03 AM
aaron.ballman accepted D45615: [builtins] __builtin_dump_struct : added more types format.

LGTM! I will go ahead and commit on your behalf. Btw, if you're thinking of making additional patches, now might be a good time to ask for commit privileges (https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access).

Tue, Apr 17, 7:00 AM
aaron.ballman closed D45665: [builtin-dump-struct] printf formats generation testing.

I've committed in r330185, thank you for the patch!

Tue, Apr 17, 5:02 AM

Mon, Apr 16

aaron.ballman closed D35181: Defer addition of keywords to identifier table when loading AST.

Committed in r330159. Thank you for the patch!

Mon, Apr 16, 2:10 PM · Restricted Project
aaron.ballman accepted D45665: [builtin-dump-struct] printf formats generation testing.

LGTM!

Mon, Apr 16, 12:52 PM

Sat, Apr 14

aaron.ballman accepted D35181: Defer addition of keywords to identifier table when loading AST.

LGTM aside from a few small nits.

Sat, Apr 14, 7:02 AM · Restricted Project

Fri, Apr 13

aaron.ballman requested changes to D45615: [builtins] __builtin_dump_struct : added more types format.

Tests?

I can do this. But currently, I am not testing the formats in the tests..

Fri, Apr 13, 5:42 AM
aaron.ballman added a reviewer for D45601: Warn on bool* to bool conversion: aaron.ballman.

I'd also be interested to see the number of false positives and true positives when run over some large code bases (both C and C++). For instance, I would imagine code like this to be somewhat common and very reasonable:

void some_func(int someArg, bool *someResult) {
  if (someResult)
    *someResult = false;
}

Especially in C code where references are not available. This makes me wary of making this a compiler diagnostic, but clang-tidy may still be a reasonable place for this functionality to live.

Fri, Apr 13, 5:36 AM

Thu, Apr 12

aaron.ballman closed D44155: Fix support for try_acquire_capability.

Committed the fix in r329930.

Thu, Apr 12, 10:57 AM
aaron.ballman accepted D44155: Fix support for try_acquire_capability.

I think this code is ready to go in -- accepting my own revision so that I can close. If @delesley spots any issues, they can be address post commit.

Thu, Apr 12, 10:57 AM
aaron.ballman closed D45403: Make [[maybe_unused]] work with static data members.

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

Thu, Apr 12, 5:27 AM

Wed, Apr 11

aaron.ballman accepted D44602: [clang-tidy] readability-function-size: add VariableThreshold param..

Aside from some minor nits, LGTM!

Wed, Apr 11, 7:15 AM · Restricted Project

Tue, Apr 10

aaron.ballman closed D44093: [BUILTINS] structure pretty printer.

I see we all found the solution at the same time. Yay teamwork! :-D

Tue, Apr 10, 3:01 PM
aaron.ballman added a comment to D44093: [BUILTINS] structure pretty printer.

Sorry about it, I also have the warning on my machine, but not the error you get...
Those test are actually working on my different linux machines, that's really weird.
This one is actually really weird, because I could find manually the missing pattern in your output.. I just don't get what is happening.

Tue, Apr 10, 3:01 PM
aaron.ballman added a comment to D44093: [BUILTINS] structure pretty printer.

Thank you for rebasing, but the patch does not pass tests locally for me. I get the following results (testing on Windows x64 with MSVC 2017 in a Debug build):

Tue, Apr 10, 1:57 PM
aaron.ballman added a comment to D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant.

Thank you for working on this!

Tue, Apr 10, 1:34 PM
aaron.ballman accepted D45403: Make [[maybe_unused]] work with static data members.

LGTM!

Tue, Apr 10, 12:10 PM
aaron.ballman added a comment to D44093: [BUILTINS] structure pretty printer.

Can you rebase the patch? The patch did not apply cleanly for me against trunk (the contents of the check function are appearing in CheckARMBuiltinExclusiveCall()).

Tue, Apr 10, 11:55 AM
aaron.ballman added a comment to D43750: Allow writing calling convention attributes on function types.

Ping.

Tue, Apr 10, 11:24 AM
aaron.ballman added a comment to D44155: Fix support for try_acquire_capability.

Ping.

Tue, Apr 10, 11:24 AM
aaron.ballman added a comment to D44093: [BUILTINS] structure pretty printer.

I don't really know what's the procedure right now.. What should I do once you both accepted the patch ? :)

Tue, Apr 10, 10:55 AM
aaron.ballman added inline comments to D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
Tue, Apr 10, 10:22 AM
aaron.ballman added inline comments to D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.
Tue, Apr 10, 9:45 AM
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Tue, Apr 10, 9:03 AM · Restricted Project
aaron.ballman accepted D45414: [clang-tidy] add missing assignment operations in hicpp-signed-bitwise.

LG aside from a diagnostic wording nit.

Tue, Apr 10, 8:20 AM
aaron.ballman accepted D44093: [BUILTINS] structure pretty printer.

LGTM with some minor commenting nits.

Tue, Apr 10, 7:57 AM
aaron.ballman accepted D45447: [clang-tidy] Adding alias for anon namespaces in header (fuchsia module).

LGTM aside from a minor docs nit.

Tue, Apr 10, 7:52 AM · Restricted Project
aaron.ballman added inline comments to D29768: [TargetInfo] Set 'UseSignedCharForObjCBool' to false by default.
Tue, Apr 10, 6:55 AM
aaron.ballman added a reviewer for D44932: [CodeComplete] Fix completion in the middle of ident in ctor lists.: rsmith.
Tue, Apr 10, 6:48 AM
aaron.ballman added inline comments to D45050: [clang-tidy] New checker for not null-terminated result caused by strlen or wcslen.
Tue, Apr 10, 6:42 AM · Restricted Project

Mon, Apr 9

aaron.ballman added inline comments to D44093: [BUILTINS] structure pretty printer.
Mon, Apr 9, 3:28 PM
aaron.ballman added inline comments to D45403: Make [[maybe_unused]] work with static data members.
Mon, Apr 9, 3:22 PM
aaron.ballman added a comment to D45403: Make [[maybe_unused]] work with static data members.

I don't think we're currently diagnosing static data members of classes as being unused in the first place; are there plans to implement that functionality so that someone might want to write the attribute there?

Mon, Apr 9, 2:21 PM
aaron.ballman accepted D45059: [clang-tidy] Add check to catch comparisons in TEMP_FAILURE_RETRY.

LGTM with a few minor nits to be fixed.

Mon, Apr 9, 12:48 PM · Restricted Project
aaron.ballman added a comment to D44093: [BUILTINS] structure pretty printer.

Sorry for the delayed review; I'm back from vacation now and am picking things up again.

Mon, Apr 9, 12:27 PM

Mar 22 2018

aaron.ballman added inline comments to D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods.
Mar 22 2018, 12:38 PM
aaron.ballman added inline comments to D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods.
Mar 22 2018, 12:29 PM
aaron.ballman added inline comments to D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods.
Mar 22 2018, 12:23 PM
aaron.ballman added reviewers for D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods: sbenza, klimek.

Adding some folks to review the dynamic matcher bits.

Mar 22 2018, 6:43 AM
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 22 2018, 5:15 AM · Restricted Project
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 22 2018, 4:51 AM · Restricted Project

Mar 21 2018

aaron.ballman accepted D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods.

LGTM with a minor doc nit.

Mar 21 2018, 2:14 PM
aaron.ballman added inline comments to D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods.
Mar 21 2018, 12:41 PM
aaron.ballman added inline comments to D42730: [clang-tidy]] Add check for use of types/classes/functions from <functional> header which are deprecated and removed in C++17.
Mar 21 2018, 11:48 AM · Restricted Project
aaron.ballman added a comment to D44559: [Sema] Wrong width of result of mul operation.

I think we're correct not to warn here and that GCC/ICC are being noisy. The existence of a temporary promotion to a wider type doesn't justify warning on arithmetic between two operands that are the same size as the ultimate result. It is totally fair for users to think of this operation as being "closed" on the original type.

Could you please clarify, are you saying that PR35409 is not a bug, and clang should continue to not warn in those cases?

Correct.

Does it mean we should abandon this revision? On the other hand it's a real bug, isn't it?

Not as I see it, no.

Mar 21 2018, 10:01 AM · Restricted Project
aaron.ballman added inline comments to D42730: [clang-tidy]] Add check for use of types/classes/functions from <functional> header which are deprecated and removed in C++17.
Mar 21 2018, 9:44 AM · Restricted Project
aaron.ballman accepted D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.

LGTM!

Mar 21 2018, 8:18 AM
aaron.ballman added a comment to D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots..

This generally looks reasonable to me, but @rsmith should weigh in before you commit because MultiSourceLocation is novel.

Mar 21 2018, 5:52 AM
aaron.ballman added a comment to D44729: [ASTMatchers] Add hasSubExpr() matcher..

I think hasSourceExpression() already does what you're looking for.

void f() {
  int i = 1.0f;
}

clang-query> match implicitCastExpr(hasSourceExpression(floatLiteral()))

Mar 21 2018, 5:44 AM
aaron.ballman added inline comments to D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods.
Mar 21 2018, 5:14 AM

Mar 20 2018

aaron.ballman added a comment to D44707: [ASTMatchers] Extend hasParameter and hasAnyParameter matches to handle Objective-C methods.

You should also regenerate the AST matcher documentation by running docs/tools/dump_ast_matchers.py

Mar 20 2018, 3:03 PM
aaron.ballman accepted D44694: [clang-tidy] Use :doc: for check links in Release Notes.

LGTM!

Mar 20 2018, 1:23 PM · Restricted Project
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 20 2018, 12:24 PM · Restricted Project
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 20 2018, 11:34 AM · Restricted Project
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 20 2018, 11:19 AM · Restricted Project
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 20 2018, 11:09 AM · Restricted Project
aaron.ballman added inline comments to D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods.
Mar 20 2018, 10:37 AM · Restricted Project
aaron.ballman edited reviewers for D44539: [Sema][Objective-C] Add check to warn when property of objc type has assign attribute, added: rjmccall; removed: aaron.ballman.

I don't know enough about ObjC to feel comfortable reviewing this, but I've added @rjmccall who may have opinions.

Mar 20 2018, 9:45 AM · Restricted Project
aaron.ballman added inline comments to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..
Mar 20 2018, 9:41 AM · Restricted Project
aaron.ballman added inline comments to D38455: [clang-tidy] new cppcoreguidelines-narrowing-conversions check..
Mar 20 2018, 9:30 AM · Restricted Project
aaron.ballman added inline comments to D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test.
Mar 20 2018, 9:26 AM
aaron.ballman added inline comments to D44602: [clang-tidy] readability-function-size: add VariableThreshold param..
Mar 20 2018, 9:10 AM · Restricted Project
aaron.ballman added inline comments to D44093: [BUILTINS] structure pretty printer.
Mar 20 2018, 8:59 AM

Mar 19 2018

aaron.ballman added a comment to D44155: Fix support for try_acquire_capability.

Please upload patches with full context (-U99999) :)

Mar 19 2018, 6:02 AM
aaron.ballman updated the diff for D44155: Fix support for try_acquire_capability.

Now: with more context!

Mar 19 2018, 6:02 AM
aaron.ballman added a comment to D44155: Fix support for try_acquire_capability.

Ping.

Mar 19 2018, 4:43 AM

Mar 17 2018

aaron.ballman accepted D44366: run-clang-tidy: forward clang-tidy exit status.

This looks reasonable to me, but I'm also not a python expert.

Mar 17 2018, 8:24 AM

Mar 16 2018

aaron.ballman added inline comments to D44231: [clang-tidy] Check for sizeof that call functions.
Mar 16 2018, 4:48 PM · Restricted Project
aaron.ballman added inline comments to D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots..
Mar 16 2018, 4:28 PM
aaron.ballman added a reviewer for D44589: [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots.: rsmith.
Mar 16 2018, 3:52 PM
aaron.ballman added a comment to D44559: [Sema] Wrong width of result of mul operation.

Fair point, what is the default signedness of char?

Mar 16 2018, 12:13 PM · Restricted Project
aaron.ballman added a comment to D44559: [Sema] Wrong width of result of mul operation.

gcc also warns for this

short foo(char a) {

return a * a;

}

Despite the fact that the char would be promoted to int, the upper bits are just sign bits and the multiply result still fits in a short.

Mar 16 2018, 11:57 AM · Restricted Project
aaron.ballman added inline comments to D44093: [BUILTINS] structure pretty printer.
Mar 16 2018, 11:54 AM
aaron.ballman added inline comments to D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods.
Mar 16 2018, 6:20 AM · Restricted Project
aaron.ballman added inline comments to D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods.
Mar 16 2018, 6:00 AM · Restricted Project
aaron.ballman added inline comments to D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods.
Mar 16 2018, 5:43 AM · Restricted Project
aaron.ballman added a comment to D44231: [clang-tidy] Check for sizeof that call functions.

As this patch can catch some mistakes, I'm fine with checking it in. I agree that it is reasonable to write normal code like sizeof(func_call()) (not false positive), maybe set the option to false by default?

Mar 16 2018, 5:36 AM · Restricted Project

Mar 14 2018

aaron.ballman accepted D44346: [clang-tidy] Add Zircon module to clang-tidy.

LGTM with some minor documentation nits.

Mar 14 2018, 4:11 PM · Restricted Project
aaron.ballman accepted D43766: [clang-tidy][modernize-make-unique] Checks c++14 flag before using std::make_unique.

LGTM!

Mar 14 2018, 1:23 PM · Restricted Project
aaron.ballman added inline comments to D44346: [clang-tidy] Add Zircon module to clang-tidy.
Mar 14 2018, 11:16 AM · Restricted Project
aaron.ballman added inline comments to D44346: [clang-tidy] Add Zircon module to clang-tidy.
Mar 14 2018, 11:04 AM · Restricted Project
aaron.ballman added a reviewer for D44480: [Sema] Don't skip function bodies with 'auto' without trailing return type: rsmith.

Adding Richard as a reviewer, because this seems somewhat clever to me (so there may be a better change to make).

Mar 14 2018, 10:53 AM
aaron.ballman accepted D43162: [Parser] (C++) Make -Wextra-semi slightly more useful.

LGTM aside from a testing nit.

Mar 14 2018, 7:28 AM · Restricted Project
aaron.ballman added a comment to D44439: [Sema] Pop function scope when instantiating a func with skipped body.

@aaron.ballman , here's a test-case I came up with. I'll fix the other issue (invalid error, that forces the test to fail) and submit it for review along with the fix for the error. Does that SG?

Mar 14 2018, 5:29 AM
aaron.ballman accepted D44439: [Sema] Pop function scope when instantiating a func with skipped body.

LGTM, thank you for the explanation about the tests.

Mar 14 2018, 5:25 AM
aaron.ballman requested changes to D44439: [Sema] Pop function scope when instantiating a func with skipped body.

Test case for this change?

Mar 14 2018, 4:49 AM

Mar 13 2018

aaron.ballman added inline comments to D44346: [clang-tidy] Add Zircon module to clang-tidy.
Mar 13 2018, 6:13 PM · Restricted Project
aaron.ballman added a comment to D16008: [clang-tidy] Add calling virtual functions in constructors/destructors check..

Do you know why the CSA checker is still in alpha?

It isn't - https://reviews.llvm.org/D26768 moved it to optin.

I don't know why https://reviews.llvm.org/D34275 didn't turn it on by default.

Mar 13 2018, 5:47 PM
aaron.ballman added inline comments to D44295: [clang-tidy] Detect and fix calls to grand-...parent virtual methods instead of calls to parent's virtual methods.
Mar 13 2018, 5:40 PM · Restricted Project
aaron.ballman added a comment to D44346: [clang-tidy] Add Zircon module to clang-tidy.

I dreamed up some test cases that may or may not make sense. I think they boil down to a few things:

Mar 13 2018, 5:00 PM · Restricted Project
aaron.ballman added a comment to D43248: [Attr] Fix parameter indexing for attributes.

I'd prefer to move it than to expect people to obey such a comment. Let's see what Aaron says.

Mar 13 2018, 2:11 PM
aaron.ballman added inline comments to D44346: [clang-tidy] Add Zircon module to clang-tidy.
Mar 13 2018, 1:07 PM · Restricted Project
aaron.ballman added a comment to D16008: [clang-tidy] Add calling virtual functions in constructors/destructors check..

If the CSA checker is still in alpha, I'd proceed with this check instead of investing time in polishing the CSA implementation.

Mar 13 2018, 5:43 AM

Mar 12 2018

aaron.ballman accepted D43248: [Attr] Fix parameter indexing for attributes.

LGTM with the test comments fixed up.

Mar 12 2018, 7:02 PM
aaron.ballman added inline comments to D43248: [Attr] Fix parameter indexing for attributes.
Mar 12 2018, 6:49 PM