]> granicus.if.org Git - clang/commit
[analyzer] Add an option to use the last location in the main source file as the...
authorAnna Zaks <ganna@apple.com>
Thu, 16 May 2013 22:30:45 +0000 (22:30 +0000)
committerAnna Zaks <ganna@apple.com>
Thu, 16 May 2013 22:30:45 +0000 (22:30 +0000)
commitd95b70175646829c26344d5f0bda1ec3009f2a5b
tree1c7011ec8c90dbba413d5d5208dcf04652254864
parent989d0b17f041bad38c3cde09d56b48df493e1d03
[analyzer] Add an option to use the last location in the main source file as the report location.

Previously, we’ve used the last location of the analyzer issue path as the location of the
report. This might not provide the best user experience, when one analyzer a source
file and the issue appears in the header. Introduce an option to use the last location
of the path that is in the main source file as the report location.

New option can be enabled with -analyzer-config report-in-main-source-file=true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@182058 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/StaticAnalyzer/Core/AnalyzerOptions.h
include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h
include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h
lib/StaticAnalyzer/Core/AnalyzerOptions.cpp
lib/StaticAnalyzer/Core/BugReporter.cpp
lib/StaticAnalyzer/Core/PathDiagnostic.cpp
lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
test/Analysis/diagnostics/Inputs/include/report-issues-within-main-file.h [new file with mode: 0644]
test/Analysis/diagnostics/report-issues-within-main-file.cpp [new file with mode: 0644]