summaryrefslogtreecommitdiffstats
path: root/lib/ARCMigrate/PlistReporter.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /lib/ARCMigrate/PlistReporter.cpp
parent38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff)
downloadFreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip
FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'lib/ARCMigrate/PlistReporter.cpp')
-rw-r--r--lib/ARCMigrate/PlistReporter.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/ARCMigrate/PlistReporter.cpp b/lib/ARCMigrate/PlistReporter.cpp
index 53398b2..9a51690 100644
--- a/lib/ARCMigrate/PlistReporter.cpp
+++ b/lib/ARCMigrate/PlistReporter.cpp
@@ -100,16 +100,18 @@ void arcmt::writeARCDiagsToPlist(const std::string &outPath,
// Output the location of the bug.
o << " <key>location</key>\n";
- EmitLocation(o, SM, LangOpts, D.getLocation(), FM, 2);
+ EmitLocation(o, SM, D.getLocation(), FM, 2);
// Output the ranges (if any).
- StoredDiagnostic::range_iterator RI = D.range_begin(), RE = D.range_end();
-
- if (RI != RE) {
+ if (!D.getRanges().empty()) {
o << " <key>ranges</key>\n";
o << " <array>\n";
- for (; RI != RE; ++RI)
- EmitRange(o, SM, LangOpts, *RI, FM, 4);
+ for (auto &R : D.getRanges()) {
+ CharSourceRange ExpansionRange(SM.getExpansionRange(R.getAsRange()),
+ R.isTokenRange());
+ EmitRange(o, SM, Lexer::getAsCharRange(ExpansionRange, SM, LangOpts),
+ FM, 4);
+ }
o << " </array>\n";
}
OpenPOWER on IntegriCloud