This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy] Added a new option to lambda-function-name to ignore warnings in macro expansion
ClosedPublic

Authored by felix642 on Aug 13 2023, 7:37 PM.

Details

Summary

Improved check lambda-function-name with option IgnoreMacros to ignore warnings in macro expansion.
Relates to #62857 (https://github.com/llvm/llvm-project/issues/62857)

Diff Detail

Event Timeline

felix642 created this revision.Aug 13 2023, 7:37 PM
felix642 requested review of this revision.Aug 13 2023, 7:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 13 2023, 7:37 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
PiotrZSL requested changes to this revision.Aug 14 2023, 1:00 AM

Missing storeOptions metod, everyting else looks +- fine.

clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp
97

Better would be to check IgnoreMacros before we read ER, in separate if

clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.h
35

use getLocalOrGlobal, in future it may become more usefull

41

Missing storeOptions metod

This revision now requires changes to proceed.Aug 14 2023, 1:00 AM
felix642 updated this revision to Diff 550156.Aug 14 2023, 5:41 PM

Code review

Move constructor to cpp file
Added store options

felix642 marked 3 inline comments as done.Aug 14 2023, 5:42 PM
felix642 updated this revision to Diff 550159.Aug 14 2023, 6:05 PM

Updated commit message

PiotrZSL accepted this revision.Aug 14 2023, 11:36 PM

LGTM

clang-tools-extra/clang-tidy/bugprone/LambdaFunctionNameCheck.cpp
91–93
This revision is now accepted and ready to land.Aug 14 2023, 11:36 PM
felix642 updated this revision to Diff 550559.Aug 15 2023, 5:33 PM

Updated format

HI @PiotrZSL, I do not have the rights to commit to the LLVM repository. Could you please commit those changes for me?