This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Allow empty .clang-format file
ClosedPublic

Authored by owenpan on Apr 11 2022, 12:08 PM.

Diff Detail

Event Timeline

owenpan created this revision.Apr 11 2022, 12:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 12:08 PM
owenpan requested review of this revision.Apr 11 2022, 12:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 11 2022, 12:08 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
curdeius accepted this revision.Apr 11 2022, 12:43 PM

I have stumbled on it myself several times but never really needed a fix.
Out of curiosity, what motivates you to do this change?

This revision is now accepted and ready to land.Apr 11 2022, 12:43 PM

I have stumbled on it myself several times but never really needed a fix.
Out of curiosity, what motivates you to do this change?

I was playing with adding/removing some options in a .clang-format file that sometimes became empty as a result. I could work around this bug by commenting out the options instead of removing them but decided to fix it because sooner or later someone else will encounter the same problem and file a bug report.

owenpan updated this revision to Diff 422335.Apr 12 2022, 2:42 PM

Updated the affected clang test.

This revision was landed with ongoing or failed builds.Apr 12 2022, 3:45 PM
This revision was automatically updated to reflect the committed changes.
owenpan updated this revision to Diff 422373.Apr 12 2022, 5:57 PM

Updated command line tests.

This revision was landed with ongoing or failed builds.Apr 12 2022, 9:21 PM