This is an archive of the discontinued LLVM Phabricator instance.

[clang-tidy][NFC] add debug log when clean empty namespace
AbandonedPublic

Authored by HerrCai0907 on Mar 25 2023, 2:29 PM.

Details

Reviewers
njames93
PiotrZSL
Summary

Adding debug log when clean empty namespace can make #60051 more cleaner.
User will not be confused why the whole namespace is deleted after fixing modernize-concat-nested-namespaces.

Diff Detail

Event Timeline

HerrCai0907 created this revision.Mar 25 2023, 2:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2023, 2:29 PM
Herald added a subscriber: xazax.hun. · View Herald Transcript
HerrCai0907 requested review of this revision.Mar 25 2023, 2:29 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2023, 2:29 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript
HerrCai0907 edited the summary of this revision. (Show Details)
PiotrZSL requested changes to this revision.EditedMar 28 2023, 7:26 AM

This shouldn't be delivered. Do such tests, locally, instead of committing them.
This change impact clang, and all tools, not only clang-tidy, therfor [clang-tidy] prefix is misleading.

Issue related to modernize-concat-nested-namespaces should be fixed by clang-tidy itself.
It's visible in AST, so clang-tidy could fix it.

TranslationUnitDecl
`-NamespaceDecl <line:1:1, line:3:1> line:1:11 a
  `-NamespaceDecl <line:2:1, col:14> col:11 b

For me this change should be abandoned.
And proper way of informing users would be to emit warning with that information from clang-tidy, not by adding some debug logs to code.

This revision now requires changes to proceed.Mar 28 2023, 7:26 AM
HerrCai0907 abandoned this revision.Mar 28 2023, 5:44 PM