<div dir="ltr"><div><div><div><div>Hi Artem,<br><br></div>This revision broke one our our builders:<br><a href="http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/21910">http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/21910</a><br><br></div>Please have a look at it.<br><br></div>Thanks<br><br></div>Galina<br><div><div><div><div><div><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 7, 2016 at 4:26 AM, Artem Dergachev via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dergachev<br>
Date: Fri Oct  7 06:26:15 2016<br>
New Revision: 283540<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=283540&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project?rev=283540&view=rev</a><br>
Log:<br>
[analyzer] Re-apply r283092, attempt no.3, in small chunks this time.<br>
<br>
<br>
Modified:<br>
    cfe/trunk/include/clang/<wbr>StaticAnalyzer/Core/<wbr>BugReporter/BugReporter.h<br>
<br>
Modified: cfe/trunk/include/clang/<wbr>StaticAnalyzer/Core/<wbr>BugReporter/BugReporter.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h?rev=283540&r1=283539&r2=283540&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-<wbr>project/cfe/trunk/include/<wbr>clang/StaticAnalyzer/Core/<wbr>BugReporter/BugReporter.h?rev=<wbr>283540&r1=283539&r2=283540&<wbr>view=diff</a><br>
==============================<wbr>==============================<wbr>==================<br>
--- cfe/trunk/include/clang/<wbr>StaticAnalyzer/Core/<wbr>BugReporter/BugReporter.h (original)<br>
+++ cfe/trunk/include/clang/<wbr>StaticAnalyzer/Core/<wbr>BugReporter/BugReporter.h Fri Oct  7 06:26:15 2016<br>
@@ -66,6 +66,7 @@ public:<br>
   typedef SmallVector<std::unique_ptr<<wbr>BugReporterVisitor>, 8> VisitorList;<br>
   typedef VisitorList::iterator visitor_iterator;<br>
   typedef SmallVector<StringRef, 2> ExtraTextList;<br>
+  typedef SmallVector<const PathDiagnosticNotePiece *, 4> NoteList;<br>
<br>
 protected:<br>
   friend class BugReporter;<br>
@@ -82,7 +83,8 @@ protected:<br>
   const ExplodedNode *ErrorNode;<br>
   SmallVector<SourceRange, 4> Ranges;<br>
   ExtraTextList ExtraText;<br>
-<br>
+  NoteList Notes;<br>
+<br>
   typedef llvm::DenseSet<SymbolRef> Symbols;<br>
   typedef llvm::DenseSet<const MemRegion *> Regions;<br>
<br>
@@ -177,6 +179,18 @@ public:<br>
   const BugType& getBugType() const { return BT; }<br>
   BugType& getBugType() { return BT; }<br>
<br>
+  /// \brief True when the report has an execution path associated with it.<br>
+  ///<br>
+  /// A report is said to be path-sensitive if it was thrown against a<br>
+  /// particular exploded node in the path-sensitive analysis graph.<br>
+  /// Path-sensitive reports have their intermediate path diagnostics<br>
+  /// auto-generated, perhaps with the help of checker-defined visitors,<br>
+  /// and may contain extra notes.<br>
+  /// Path-insensitive reports consist only of a single warning message<br>
+  /// in a specific location, and perhaps extra notes.<br>
+  /// Path-sensitive checkers are allowed to throw path-insensitive reports.<br>
+  bool isPathSensitive() const { return ErrorNode != nullptr; }<br>
+<br>
   const ExplodedNode *getErrorNode() const { return ErrorNode; }<br>
<br>
   StringRef getDescription() const { return Description; }<br>
@@ -245,7 +259,26 @@ public:<br>
   void setDeclWithIssue(const Decl *declWithIssue) {<br>
     DeclWithIssue = declWithIssue;<br>
   }<br>
-<br>
+<br>
+  /// Add new item to the list of additional notes that need to be attached to<br>
+  /// this path-insensitive report. If you want to add extra notes to a<br>
+  /// path-sensitive report, you need to use a BugReporterVisitor because it<br>
+  /// allows you to specify where exactly in the auto-generated path diagnostic<br>
+  /// the extra note should appear.<br>
+  void addNote(StringRef Msg, const PathDiagnosticLocation &Pos,<br>
+                    ArrayRef<SourceRange> Ranges = {}) {<br>
+    auto *P = new PathDiagnosticNotePiece(Pos, Msg);<br>
+<br>
+    for (const auto &R : Ranges)<br>
+      P->addRange(R);<br>
+<br>
+    Notes.push_back(P);<br>
+  }<br>
+<br>
+  virtual const NoteList &getNotes() {<br>
+    return Notes;<br>
+  }<br>
+<br>
   /// \brief This allows for addition of meta data to the diagnostic.<br>
   ///<br>
   /// Currently, only the HTMLDiagnosticClient knows how to display it.<br>
<br>
<br>
______________________________<wbr>_________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div>