diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-28 20:14:54 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2015-01-28 20:14:54 +0000 |
commit | a790e1afc27fa0643f220bb2ccb2db2534404f6f (patch) | |
tree | e4cc073a0b91295436bf3f857010792970cc4e59 /lib/ARCMigrate | |
parent | 6993b070322ddf4d58219bb11e647975d077d2f0 (diff) |
Fix layering violation: include/clang/Basic/PlistSupport.h should not include
files from include/clang/Lex. Clean up module map.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227361 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ARCMigrate')
-rw-r--r-- | lib/ARCMigrate/PlistReporter.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/ARCMigrate/PlistReporter.cpp b/lib/ARCMigrate/PlistReporter.cpp index 53398b27af..9a51690c0c 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"; } |