Page MenuHomePhabricator

In clang-tidy base checks prevent anonymous functions from triggering assertions

Authored by bogser01 on Aug 4 2020, 9:37 AM.



Skeleton checks generated by clang-tidy cause assertions to fail when run over anonymous functions(lambda functions). This patch introduces an additional check to verify that the target function is not anonymous before calling getName().
The code snippet from the [[ | clang-tidy tutorial ]]is also updated.

Diff Detail

Event Timeline

bogser01 created this revision.Aug 4 2020, 9:37 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 4 2020, 9:37 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
bogser01 requested review of this revision.Aug 4 2020, 9:37 AM
DavidTruby accepted this revision.Aug 10 2020, 6:39 AM
DavidTruby added a reviewer: DavidTruby.

LGTM - please wait for someone more familiar with clang-tidy to review as well

This revision is now accepted and ready to land.Aug 10 2020, 6:40 AM
alexfh accepted this revision.Aug 10 2020, 8:45 AM

LG with a couple of comments. Do you need someone to land the patch for you?


No need for parentheses around this.