This is an archive of the discontinued LLVM Phabricator instance.

[fir] Update clang-tidy for the Optimizer directory
ClosedPublic

Authored by clementval on Oct 11 2021, 1:28 AM.

Details

Summary

Update .clang-tidy file with the value used in fir-dev.

This patch is part of the upstreaming effort from fir-dev branch.

Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>

Diff Detail

Event Timeline

clementval created this revision.Oct 11 2021, 1:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2021, 1:28 AM
Herald added a subscriber: mehdi_amini. · View Herald Transcript
clementval requested review of this revision.Oct 11 2021, 1:28 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2021, 1:28 AM

Add flang/inlude/flang/Optmizer/.clang-tidy

rovka accepted this revision.Oct 11 2021, 1:55 AM

LGTM, thanks.

This revision is now accepted and ready to land.Oct 11 2021, 1:55 AM
This revision was automatically updated to reflect the committed changes.

I'm a bit puzzled, many of the values are already defined at the top-level and I don't see an override on the path there. What's the effect of this?

Please provide correct commit description, just saying Update .clang-tidy file with the value used in fir-dev. isn't helpful.

I'm a bit puzzled, many of the values are already defined at the top-level and I don't see an override on the path there. What's the effect of this?

Please provide correct commit description, just saying Update .clang-tidy file with the value used in fir-dev. isn't helpful.

Actually, they aren't. flang/.clang-tidy has a number of deltas to {mlir,llvm}/.clang-tidy, as the front end uses its own style. The files under Optimizer use the MLIR style since the code makes very heavy use of MLIR (obviously).

I'm a bit puzzled, many of the values are already defined at the top-level and I don't see an override on the path there. What's the effect of this?

Please provide correct commit description, just saying Update .clang-tidy file with the value used in fir-dev. isn't helpful.

Actually, they aren't. flang/.clang-tidy has a number of deltas to {mlir,llvm}/.clang-tidy,

I looked before commenting, I didn't spot it, can you link more precisely?

For example here is what I see at HEAD:

$ cat flang/.clang-tidy 
Checks: '-llvm-include-order,readability-braces-around-statements,-readability-identifier-naming,-clang-diagnostic-*'
InheritParentConfig: true

And at the top level the values are matching what is added in this revision.

I'm a bit puzzled, many of the values are already defined at the top-level and I don't see an override on the path there. What's the effect of this?

Please provide correct commit description, just saying Update .clang-tidy file with the value used in fir-dev. isn't helpful.

Actually, they aren't. flang/.clang-tidy has a number of deltas to {mlir,llvm}/.clang-tidy,

I looked before commenting, I didn't spot it, can you link more precisely?

For example here is what I see at HEAD:

$ cat flang/.clang-tidy 
Checks: '-llvm-include-order,readability-braces-around-statements,-readability-identifier-naming,-clang-diagnostic-*'
InheritParentConfig: true

And at the top level the values are matching what is added in this revision.

I guess you mean llvm-project/.clang-tidy if so you are right the key/value are the same. If this is a problem to ensure those value at this level we can probably remove them. For the commit message I'm not sure we can be more helpful. The changes are self-explanatory so it would help much to describe it in the commit message in my opinion.

I'm a bit puzzled, many of the values are already defined at the top-level and I don't see an override on the path there. What's the effect of this?

Please provide correct commit description, just saying Update .clang-tidy file with the value used in fir-dev. isn't helpful.

Actually, they aren't. flang/.clang-tidy has a number of deltas to {mlir,llvm}/.clang-tidy,

I looked before commenting, I didn't spot it, can you link more precisely?

For example here is what I see at HEAD:

$ cat flang/.clang-tidy 
Checks: '-llvm-include-order,readability-braces-around-statements,-readability-identifier-naming,-clang-diagnostic-*'
InheritParentConfig: true

And at the top level the values are matching what is added in this revision.

What we want to achieve is to have the same clang-tidy behavior than MLIR in these directories since the code here uses a lot of MLIR. We might need to double check whether it is still wise to inherit the config from the parent since the flang/.clang-tidy has a differnt style.

For the commit message I'm not sure we can be more helpful. The changes are self-explanatory so it would help much to describe it in the commit message in my opinion.

Right now this patch has no effect basically as far as I can tell, so it does not seem like self explanatory in itself.
Can you revert this please?

For the commit message I'm not sure we can be more helpful. The changes are self-explanatory so it would help much to describe it in the commit message in my opinion.

Right now this patch has no effect basically as far as I can tell, so it does not seem like self explanatory in itself.
Can you revert this please?

Done. We will update that on fir-dev side and submit a new one.