This revision was automatically updated to reflect the committed changes. Closed by commit rL368950: [NFCI] Always initialize BugReport const fields (authored by xiaobai, committed by ). Herald added a project: LLVM.
Changed prior to commit: https://reviews.llvm.org/D66265?vs=215292&id=215299#toc Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66265/new/ https://reviews.llvm.org/D66265 Files: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h Index: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h =================================================================== --- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h +++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h @@ -180,10 +180,12 @@ /// to the user. This method allows to rest the location which should be used /// for uniquing reports. For example, memory leaks checker, could set this to /// the allocation site, rather then the location where the bug is reported. - BugReport(BugType& bt, StringRef desc, const ExplodedNode *errornode, + BugReport(BugType &bt, StringRef desc, const ExplodedNode *errornode, PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique) : BT(bt), Description(desc), UniqueingLocation(LocationToUnique), - UniqueingDecl(DeclToUnique), ErrorNode(errornode) {} + UniqueingDecl(DeclToUnique), ErrorNode(errornode), + ErrorNodeRange(getStmt() ? getStmt()->getSourceRange() + : SourceRange()) {} virtual ~BugReport() = default;
Index: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h =================================================================== --- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h +++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h @@ -180,10 +180,12 @@ /// to the user. This method allows to rest the location which should be used /// for uniquing reports. For example, memory leaks checker, could set this to /// the allocation site, rather then the location where the bug is reported. - BugReport(BugType& bt, StringRef desc, const ExplodedNode *errornode, + BugReport(BugType &bt, StringRef desc, const ExplodedNode *errornode, PathDiagnosticLocation LocationToUnique, const Decl *DeclToUnique) : BT(bt), Description(desc), UniqueingLocation(LocationToUnique), - UniqueingDecl(DeclToUnique), ErrorNode(errornode) {} + UniqueingDecl(DeclToUnique), ErrorNode(errornode), + ErrorNodeRange(getStmt() ? getStmt()->getSourceRange() + : SourceRange()) {} virtual ~BugReport() = default;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits