[PATCH] D115716: [Analyzer][BugReporter] Replace the example bug report with the one used to generate PathDiagnostic

Ella Ma via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 4 00:04:56 PST 2022


OikawaKirie updated this revision to Diff 397207.
OikawaKirie edited the summary of this revision.
OikawaKirie added a comment.

In D115716#3217786 <https://reviews.llvm.org/D115716#3217786>, @Szelethus wrote:

> First off, your patch is great, and I'm pretty sure we want it!
>
> I remember working around here, and I either have never quite understood what makes `exampleReport` an example, or have long forgotten. Can we not just rename it to `chosenReport`, or simply `report`?

Thanks a lot.

New updates:

1. add a new `BugReporter::generateDiagnosticForConsumerMap` method to handle the job before adding notes
2. add a `BugReport` field to `DiagnosticForConsumerMapTy`
3. move `findReportInEquivalenceClass` calls to `generateDiagnosticForConsumerMap` methods
4. the `exampleReport` variable in method `findReportInEquivalenceClass` is unchanged, others are removed as they are no longer required


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115716/new/

https://reviews.llvm.org/D115716

Files:
  clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
  clang/lib/StaticAnalyzer/Core/BugReporter.cpp
  clang/test/Analysis/Inputs/expected-plists/malloc-plist.c.plist
  clang/test/Analysis/keychainAPI.m
  clang/test/Analysis/malloc-plist.c
  clang/test/Analysis/stream.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115716.397207.patch
Type: text/x-patch
Size: 9678 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220104/ab1a8565/attachment-0001.bin>


More information about the cfe-commits mailing list