[PATCH] D34404: [Clang-Tidy] Preserve Message, FileOffset, FilePath in Clang-Tidy YAML output
Vladimir Plyashkun via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 5 06:22:52 PDT 2017
vladimir.plyashkun added inline comments.
================
Comment at: unittests/clang-apply-replacements/ApplyReplacementsTest.cpp:23
+ SmallVector<DiagnosticMessage, 1> EmptyNotes;
+ return tooling::Diagnostic(DiagnosticName, Message, Replacements, EmptyNotes,
+ tooling::Diagnostic::Warning, BuildDirectory);
----------------
alexfh wrote:
> vladimir.plyashkun wrote:
> > alexfh wrote:
> > > alexfh wrote:
> > > > Will `{}` work instead of `EmptyNotes`?
> > > `tooling::` is not needed due to the using directive above. Same below.
> > Unfortunately, no.
> > Constructor expects non-const reference `SmallVector<DiagnosticMessage, 1> &Notes`, so i can't pass rvalue directly to it.
> I overlooked this when committing someone's patch. Fixed in r307143. Now you can add `const` and probably also use `{}`.
Thanks, fixed it.
Repository:
rL LLVM
https://reviews.llvm.org/D34404
More information about the cfe-commits
mailing list