| Summary: | YAML file genereated by -export-fixes does not contain DiagnosticMessage node/entity | ||
|---|---|---|---|
| Product: | [Developer tools] clazy | Reporter: | Nikolai Kosjar <nikolai.kosjar> |
| Component: | general | Assignee: | Unassigned bugs <unassigned-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | normal | CC: | smartins |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
I've just tested:
$ clang-tidy -export-fixes=a.yaml -checks=modernize-use-override a.cpp --
$ cat a.yaml
---
MainSourceFile: '/data/sources/clazy/a.cpp'
Diagnostics:
- DiagnosticName: modernize-use-override
Message: 'annotate this function with ''override'' or (rarely) ''final'''
FileOffset: 79
FilePath: '/data/sources/clazy/a.cpp'
Replacements:
- FilePath: '/data/sources/clazy/a.cpp'
Offset: 84
Length: 0
ReplacementText: ' override'
...
clang-tidy 8.0.1 Sorry for not stating the used version earlier. I can confirm your observation for clang-tidy 8.x. Apparently this was changed in a later version. clang-tidy from master/trunk generates the output I've mentioned. Hmm, that this might be related to the LLVM version I build clazy against. Checking... Yup, it depends on the llvm/clang version I have built clazy against. The relevant change is https://github.com/llvm/llvm-project/commit/f2879d8a4877eafcdb12c852030746d175f8abbd and it will be part of the upcoming 9.0 release. Closing this report as there is nothing todo for clazy. |
clazy generates e.g.: --- MainSourceFile: 'FILE_PATH' Diagnostics: - DiagnosticName: clazy-qgetenv Message: 'qgetenv().isEmpty() allocates. Use qEnvironmentVariableIsEmpty() instead' FileOffset: 150 FilePath: 'FILE_PATH' Replacements: ... ... while clang-tidy generates: --- MainSourceFile: 'FILE_PATH' Diagnostics: - DiagnosticName: modernize-use-nullptr DiagnosticMessage: Message: use nullptr FilePath: 'FILE_PATH' FileOffset: 150 Replacements: .... ... Note that clazy does not produce a "DiagnosticMessage" node/entity.