Page MenuHomePhabricator
Feed Advanced Search

Today

aaron.ballman added a comment to D56967: Thread safety analysis: Improve diagnostics for double locking.

Thanks for the review! I'll commit this when I have commit access again, which is waiting for my employer's approval to the relicensing.

Tue, Jan 22, 5:03 AM
aaron.ballman added a comment to D57012: Merge similar target diagnostics for interrupt attribute into one. NFC.

@aaron.ballman Thanks! Could I ask you to commit the patch? I don't have commit access yet.

Tue, Jan 22, 5:02 AM

Yesterday

aaron.ballman accepted D56967: Thread safety analysis: Improve diagnostics for double locking.

LGTM aside from a naming convention nit.

Mon, Jan 21, 11:27 AM
aaron.ballman added a parent revision for D56960: NFC: Implement GenericSelectionExpr::Association dump with Visitor: D56959: [AST] NFC: Introduce new class GenericSelectionExpr::Association.
Mon, Jan 21, 11:14 AM
aaron.ballman added a child revision for D56959: [AST] NFC: Introduce new class GenericSelectionExpr::Association: D56960: NFC: Implement GenericSelectionExpr::Association dump with Visitor.
Mon, Jan 21, 11:14 AM
aaron.ballman accepted D57012: Merge similar target diagnostics for interrupt attribute into one. NFC.

LGTM aside from a commenting nit, thank you for the cleanup!

Mon, Jan 21, 8:30 AM
aaron.ballman closed D56992: [clang] Mark lambda-to-function-pointer conversion as noexcept.

I needed to make some minor alterations to your patch. The CXX DR status page is automatically generated and I didn't remember that. I went and added an additional test case and did the automated DR regeneration. I've commit in r351750, thank you for the patch!

Mon, Jan 21, 8:25 AM
aaron.ballman added inline comments to D56959: [AST] NFC: Introduce new class GenericSelectionExpr::Association.
Mon, Jan 21, 7:58 AM
aaron.ballman accepted D56945: [clang-tidy] Delete obsolete objc-property-declaration options ✂️.

LGTM

Mon, Jan 21, 7:47 AM · Restricted Project
aaron.ballman accepted D56892: Add a priority field to availability attributes to prioritize explicit attributes from declaration over attributes from '#pragma clang attribute'.

LGTM with a suggested edit for the docs (which look great, btw!).

Mon, Jan 21, 7:38 AM
aaron.ballman accepted D56992: [clang] Mark lambda-to-function-pointer conversion as noexcept.

Aside from the DR status page and a nit with the test's RUN line, this LGTM. Thank you for working on this -- do you need me to commit on your behalf? If so, are you aware of the recent relicensing of the project and intending to contribute under the new license?

Mon, Jan 21, 7:15 AM
aaron.ballman added inline comments to D56959: [AST] NFC: Introduce new class GenericSelectionExpr::Association.
Mon, Jan 21, 7:07 AM
aaron.ballman added a comment to D56916: Fix crash due to ObjCPropertyDecl.

Test case? Or does one already cover this crash?

Mon, Jan 21, 5:41 AM
aaron.ballman added inline comments to D56959: [AST] NFC: Introduce new class GenericSelectionExpr::Association.
Mon, Jan 21, 5:35 AM
aaron.ballman added inline comments to D56960: NFC: Implement GenericSelectionExpr::Association dump with Visitor.
Mon, Jan 21, 5:27 AM
aaron.ballman accepted D56960: NFC: Implement GenericSelectionExpr::Association dump with Visitor.

LGTM with a few small cosmetic changes.

Mon, Jan 21, 5:23 AM
aaron.ballman accepted D56961: NFC: Move GenericSelectionExpr dump to NodeDumper.

LGTM!

Mon, Jan 21, 5:17 AM
aaron.ballman edited reviewers for D56992: [clang] Mark lambda-to-function-pointer conversion as noexcept, added: rsmith; removed: llvm-commits, doug.gregor.

Pre-C++17 standards don't have this requirement; however, they don't forbid the conversion functions to have this specification either.

Mon, Jan 21, 4:55 AM

Fri, Jan 18

aaron.ballman accepted D56829: Move decl context dumping to TextNodeDumper.

LGTM! At some point, we may want to revisit how we dump TranslationUnitDecl to make it a bit less inscrutable (I have no idea what those "invalid sloc" strings are telling me). At that point, we may want to turn <undeserialized declarations> into undeserialized_declarations as well so it stands out a bit more.

Fri, Jan 18, 4:02 PM
aaron.ballman updated subscribers of D45978: dllexport const variables must have external linkage..
Fri, Jan 18, 11:34 AM
aaron.ballman added inline comments to D45978: dllexport const variables must have external linkage..
Fri, Jan 18, 11:29 AM
aaron.ballman accepted D56879: [Sema] Suppress a warning about a forward-declared fixed enum in C mode.

LGTM!

Fri, Jan 18, 11:07 AM
aaron.ballman accepted D56918: [clang-tidy] add reproducer for PR39949 into test-suite.

LGTM, thank you for the extra test coverage!

Fri, Jan 18, 10:03 AM · Restricted Project
aaron.ballman added a comment to D54141: [clang-tidy] add deduplication support for run-clang-tidy.py.

If you're suggesting proceeding with this regex based solution, I

don't think that's a good idea. Why commit a hack which people will object to ever removing? Just see if we can do the right thing instead.

+1, my main concern is the complexity of the patch and maintenance burden of the python script.

Fri, Jan 18, 10:01 AM · Restricted Project
aaron.ballman accepted D56829: Move decl context dumping to TextNodeDumper.

LGTM aside from the testing situation -- so long as the tests come out without changes, this is good to go. If there is a change in test behavior, let's do another round of review just to verify everyone's happy with the behavioral change.

Fri, Jan 18, 7:07 AM
aaron.ballman accepted D56751: [ASTDump] Mark variadic declarations with a tag instead of child node.

LGTM!

Fri, Jan 18, 6:44 AM
aaron.ballman added a comment to D56892: Add a priority field to availability attributes to prioritize explicit attributes from declaration over attributes from '#pragma clang attribute'.

I think the documentation for the attribute should be updated to explain this new behavior, otherwise this will be a very inexplicable feature to users.

Fri, Jan 18, 6:36 AM
aaron.ballman added inline comments to D56879: [Sema] Suppress a warning about a forward-declared fixed enum in C mode.
Fri, Jan 18, 6:09 AM
aaron.ballman accepted D56753: [ASTDump] Mark null params with a tag rather than a child node.

With bracket and comment changes, LGTM. No need for tests on this one because the scenario changed can only occur during debugging.

Fri, Jan 18, 5:52 AM
aaron.ballman accepted D56752: [ASTDump] Mark BlockDecls which capture this with a tag.

LGTM!

Fri, Jan 18, 5:45 AM

Thu, Jan 17

aaron.ballman accepted D56532: [clang-tidy] Add the abseil-duration-conversion-cast check.

LGTM!

Thu, Jan 17, 10:56 AM · Restricted Project
aaron.ballman accepted D55447: [Sema] Fix Modified Type in address_space AttributedType.

This LGTM, but you should wait a bit to see if @rsmith would like to weigh in. If you don't hear back by mid-next week, go ahead and commit.

Thu, Jan 17, 10:53 AM · Restricted Project
aaron.ballman added a comment to D54909: [clang][slh] add Clang attr no_speculative_load_hardening.

I'm going to revert the diagnostic changes for now and commit this patch. I tried a few ways to implement this without success so far. I have one additional way I want to try based on some advice on the cfe-dev list, but I'll submit it in another patch once I get some time to try and implement it.

Thu, Jan 17, 10:48 AM
aaron.ballman added a comment to D56849: [ASTMatchers][NFC] Update comments on assorted `CXXMemberCallExpr` matchers..

Some minor nits, but this is a good improvement!

Thu, Jan 17, 7:47 AM
aaron.ballman added inline comments to D56753: [ASTDump] Mark null params with a tag rather than a child node.
Thu, Jan 17, 7:21 AM
aaron.ballman added a comment to D56829: Move decl context dumping to TextNodeDumper.

I don't know what C++ code results in the undeserialized declarations output. Can you suggest some?

Thu, Jan 17, 6:29 AM
aaron.ballman added a comment to D56829: Move decl context dumping to TextNodeDumper.

It appears we have no test coverage for this case -- can you introduce some?

Thu, Jan 17, 5:26 AM

Wed, Jan 16

aaron.ballman added inline comments to D55447: [Sema] Fix Modified Type in address_space AttributedType.
Wed, Jan 16, 6:04 AM · Restricted Project
aaron.ballman added inline comments to D56663: [MSP430] Improve support of 'interrupt' attribute.
Wed, Jan 16, 5:51 AM
aaron.ballman added inline comments to D56753: [ASTDump] Mark null params with a tag rather than a child node.
Wed, Jan 16, 5:30 AM
aaron.ballman added a comment to D56752: [ASTDump] Mark BlockDecls which capture this with a tag.

Was there no test coverage for this situation? If not, can you add some?

Wed, Jan 16, 5:29 AM
aaron.ballman added a comment to D56753: [ASTDump] Mark null params with a tag rather than a child node.

Do we have any test coverage for this change? IIRC, this was one we couldn't figure out how to trigger?

Wed, Jan 16, 5:21 AM
aaron.ballman added a comment to D56751: [ASTDump] Mark variadic declarations with a tag instead of child node.

Can you add a test for a variadic lambda in C++ as well? I suspect it will work out of the box, but the extra test coverage would be good to have. We should probably have a K&R C function example as well to ensure it doesn't print as variadic. e.g., void func(); in C mode.

Wed, Jan 16, 5:07 AM

Tue, Jan 15

aaron.ballman added inline comments to D55447: [Sema] Fix Modified Type in address_space AttributedType.
Tue, Jan 15, 1:14 PM · Restricted Project
aaron.ballman added inline comments to D56663: [MSP430] Improve support of 'interrupt' attribute.
Tue, Jan 15, 1:00 PM
aaron.ballman added inline comments to D55447: [Sema] Fix Modified Type in address_space AttributedType.
Tue, Jan 15, 1:00 PM · Restricted Project
aaron.ballman accepted D55483: Introduce the callback attribute and emit !callback metadata.

LGTM aside from some minor nits.

Tue, Jan 15, 12:53 PM
aaron.ballman added a reviewer for D56663: [MSP430] Improve support of 'interrupt' attribute: aaron.ballman.
Tue, Jan 15, 12:38 PM
aaron.ballman added inline comments to D56663: [MSP430] Improve support of 'interrupt' attribute.
Tue, Jan 15, 12:37 PM
aaron.ballman accepted D56657: [clang-tidy] bugprone-string-constructor: Catch string from nullptr..

LGTM aside from a nit and a test case request.

Tue, Jan 15, 12:33 PM · Restricted Project
aaron.ballman added inline comments to D56532: [clang-tidy] Add the abseil-duration-conversion-cast check.
Tue, Jan 15, 12:23 PM · Restricted Project
aaron.ballman added a comment to D56555: Add Attribute to define nonlazy objc classes.

In terms of implementation, the attribute code looks pretty close (just a few nits). However, someone more familiar with Obj-C should chime in with whether the attribute semantics make sense and whether the documentation will be sufficiently clear for an Objective-C user.

Tue, Jan 15, 12:06 PM
aaron.ballman accepted D55083: Re-arrange content in FunctionDecl dump.

LGTM aside from some nit cleanup.

Tue, Jan 15, 11:57 AM
aaron.ballman accepted D55394: Re-order type param children of ObjC nodes.

This is the AST dumper. This is not a user feature.

Tue, Jan 15, 11:22 AM
aaron.ballman accepted D56709: Implement BlockDecl::Capture dump in terms of visitors.

LGTM!

Tue, Jan 15, 11:11 AM
aaron.ballman accepted D56708: NFC: Implement OMPClause dump in terms of visitors.

LGTM aside from a nit.

Tue, Jan 15, 11:05 AM
aaron.ballman accepted D56707: Implement CXXCtorInitializer dump in terms of Visitor.

LGTM!

Tue, Jan 15, 10:59 AM

Mon, Jan 14

aaron.ballman accepted D56642: NFC: Move dump of type nodes to NodeDumper.

LGTM aside from auto nits.

Mon, Jan 14, 2:28 PM
aaron.ballman added a comment to D55394: Re-order type param children of ObjC nodes.

I don't really have an opinion about this, sorry.

Mon, Jan 14, 2:25 PM
aaron.ballman added a comment to D56555: Add Attribute to define nonlazy objc classes.

It's still missing the tests in SemaObjC -- you can use clang\test\SemaObjC\attr-root-class.m as an example of what I'm talking about.

Mon, Jan 14, 9:21 AM
aaron.ballman added a reviewer for D55394: Re-order type param children of ObjC nodes: rjmccall.

Adding @rjmccall as an Obj-C expert to see if he has opinions on the output changes. Also, pinging @rsmith in case he'd like to weigh in.

Mon, Jan 14, 9:11 AM
aaron.ballman added inline comments to D55483: Introduce the callback attribute and emit !callback metadata.
Mon, Jan 14, 7:04 AM
aaron.ballman added inline comments to D56642: NFC: Move dump of type nodes to NodeDumper.
Mon, Jan 14, 6:43 AM
aaron.ballman added a comment to D56642: NFC: Move dump of type nodes to NodeDumper.

Mostly looks good (a few minor nits), but I did have a design question about whether we should prefer calling a Visit method for type hierarchies instead of reimplementing the functionality.

Mon, Jan 14, 6:26 AM
aaron.ballman accepted D56643: NFC: Move Decl node handling to TextNodeDumper.

LGTM aside from some minor nits.

Mon, Jan 14, 5:58 AM
aaron.ballman accepted D56641: NFC: Move dumping of QualType node to TextNodeDumper.

LGTM!

Mon, Jan 14, 5:49 AM
aaron.ballman accepted D56640: NFC: Canonicalize handling of TypeLocInfo.

LGTM!

Mon, Jan 14, 5:46 AM
aaron.ballman accepted D56639: NFC: Move Type Visit implementation to TextNodeDumper.

LGTM aside from some minor nits.

Mon, Jan 14, 5:42 AM

Fri, Jan 11

aaron.ballman accepted D55491: Implement TemplateArgument dumping in terms of Visitor.

Aside from nits that aren't complete yet, LGTM.

Fri, Jan 11, 6:10 PM
aaron.ballman accepted D56622: [Algorithm] Add make_const_ref corresponding to make_const_ptr.

LGTM!

Fri, Jan 11, 6:07 PM
aaron.ballman added inline comments to D55483: Introduce the callback attribute and emit !callback metadata.
Fri, Jan 11, 7:02 AM
aaron.ballman requested changes to D56555: Add Attribute to define nonlazy objc classes.

The patch is missing SemaObjC tests that ensure the attribute only appertains to the expected subjects, accepts no args, etc.

Fri, Jan 11, 5:41 AM
aaron.ballman accepted D56292: [attributes] Extend os_returns_(not_?)_retained attributes to parameters..

LGTM aside from some minor nits.

Fri, Jan 11, 5:35 AM
aaron.ballman accepted D55492: Implement Attr dumping in terms of visitors.

LGTM!

Fri, Jan 11, 5:23 AM

Thu, Jan 10

aaron.ballman closed D54450: Get the correct range of tokens for preprocessor conditions.

I've commit in r350891 (clang part) and r350892 (clang-tools-extra part). If @rsmith has concerns, we can fix or revert when raised.

Thu, Jan 10, 1:27 PM
aaron.ballman added inline comments to D56473: Allow 'static' storage specifier on an out-of-line member function template declaration in MSVCCompat mode.
Thu, Jan 10, 12:19 PM
aaron.ballman accepted D56552: [clang-tidy] update FunctionSizeCheck for D56444.

LGTM!

Thu, Jan 10, 10:36 AM
aaron.ballman accepted D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on..

LGTM with one minor testing request (conditional on the test passing, of course).

Thu, Jan 10, 10:30 AM
aaron.ballman added a comment to D55646: [ASTImporter] Make ODR diagnostics warning by default.

In general, I agree that it doesn't make sense for ODR violations (with false positives) to trigger error diagnostics while performing AST merging, so downgrading this to warnings is a good idea. However, I do worry about impacting modules and C compatibility with the changes. I'm curious what @rsmith thinks the answer should be here. AFAIK, modules do not *require* ODR violations checks (I believe that's still ill-formed, no diagnostic required), but confirmation would be good.

Thu, Jan 10, 10:30 AM
aaron.ballman added inline comments to D55491: Implement TemplateArgument dumping in terms of Visitor.
Thu, Jan 10, 9:51 AM
aaron.ballman accepted D56405: Split -Wdelete-non-virtual-dtor into two groups.

LGTM!

Thu, Jan 10, 8:03 AM
aaron.ballman added inline comments to D55491: Implement TemplateArgument dumping in terms of Visitor.
Thu, Jan 10, 7:58 AM
aaron.ballman added inline comments to D55492: Implement Attr dumping in terms of visitors.
Thu, Jan 10, 7:41 AM
aaron.ballman accepted D55488: Add utility for dumping a label with child nodes.

Aside from cosmetic nits, this LGTM.

Thu, Jan 10, 7:17 AM
aaron.ballman accepted D56533: [DOCS] it it => it.

LGTM!

Thu, Jan 10, 5:09 AM

Wed, Jan 9

aaron.ballman added a comment to D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on..

Can you add a test that checks that a lambda declared within another lambda also traverses as expected?

Wed, Jan 9, 7:50 AM
aaron.ballman added a comment to D55488: Add utility for dumping a label with child nodes.

@rsmith -- do you have opinions on the new format for how we display the child node? I think this is a more clear approach, but a second opinion would be nice.

Wed, Jan 9, 7:21 AM
aaron.ballman added a comment to D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on..

I suggest not trying to make any such drastic changes for 8.0, try to fix the bug in a minimal way if possible, and have a more considered approach to the future of AST Matchers for after the release.

Wed, Jan 9, 7:05 AM
aaron.ballman added a comment to D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on..

Given that, I kind of think we should have functionDecl() match only functions, and give users some other way to match the semantic declarations in a consistent manner. Alternatively, we could decide semantics are what we want to match (because it's what the AST encodes) and instead we give users a way to request to only match syntax.

I believe matching the implied semantic nodes is how closer to how matchers behave in general (corresponding to the fact that the ASTMatcher RecursiveASTVisitor sets shouldVisitImplicitCode to true). e.g.

Wed, Jan 9, 7:02 AM
aaron.ballman added a comment to D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on..

@klimek: would it be better to preserve the odd behavior of the functionDecl() matcher, and add a new functionOrLambdaDecl()? It seems too surprising to me.

We can change the clang-tidy check as well. I think lambdas should be considered functionDecls, shouldnt they? WDYT @aaron.ballman ?

I think it depends on whether we want the AST matchers to match what the user wrote (syntax) or how the program behaves (semantics). If the user writes a lambda, they did not syntactically write a function declaration and so it makes sense for functionDecl() to not match. However, the semantics of a lambda are that they act as a functor (in effect) which includes a class declaration, a function declaration for the function call operator, conversion operators, etc and so it does make sense for users to want to match those semantic components. Given that, I kind of think we should have functionDecl() match only functions, and give users some other way to match the semantic declarations in a consistent manner. Alternatively, we could decide semantics are what we want to match (because it's what the AST encodes) and instead we give users a way to request to only match syntax.

The problem is that while I agree it would be nice if we matched either exactly the semantic or syntactic form of the code, the reality is that we match whatever the AST represents when we visit all nodes. Instead o f promising folks something that we can't hold (because nobody has time to fully check which matchers will match which form), I think telling people that we match the AST is the more honest and less surprising result in the end.

Wed, Jan 9, 6:56 AM
aaron.ballman added a comment to D56444: [AST] RecursiveASTVisitor visits lambda classes when implicit visitation is on..

@klimek: would it be better to preserve the odd behavior of the functionDecl() matcher, and add a new functionOrLambdaDecl()? It seems too surprising to me.

We can change the clang-tidy check as well. I think lambdas should be considered functionDecls, shouldnt they? WDYT @aaron.ballman ?

Wed, Jan 9, 6:30 AM

Tue, Jan 8

aaron.ballman accepted D55337: NFC: Move dumpDeclRef to NodeDumper.

Once D56407 lands, the rebased changes here LGTM

Tue, Jan 8, 10:32 AM
aaron.ballman accepted D56415: NFC: Port QueryParser to StringRef.

LGTM aside from the nits pointed out; you can fix and commit without another round of review.

Tue, Jan 8, 9:09 AM
aaron.ballman added inline comments to D56415: NFC: Port QueryParser to StringRef.
Tue, Jan 8, 8:56 AM
aaron.ballman added inline comments to D56415: NFC: Port QueryParser to StringRef.
Tue, Jan 8, 8:46 AM
aaron.ballman added inline comments to D55337: NFC: Move dumpDeclRef to NodeDumper.
Tue, Jan 8, 8:29 AM
aaron.ballman added inline comments to D56415: NFC: Port QueryParser to StringRef.
Tue, Jan 8, 8:05 AM
aaron.ballman accepted D56407: Implement the TreeStructure interface through the TextNodeDumper.

I think this is a good approach to solving the problem, so let's go this route.

Tue, Jan 8, 7:15 AM
aaron.ballman added inline comments to D56405: Split -Wdelete-non-virtual-dtor into two groups.
Tue, Jan 8, 6:32 AM
aaron.ballman added inline comments to D56292: [attributes] Extend os_returns_(not_?)_retained attributes to parameters..
Tue, Jan 8, 6:20 AM