Go to file
Bruno Cardoso Lopes c23af5707d [ASTReader] Sort RawComments before merging
`RawComments` are sorted by comparing underlying `SourceLocation`'s. This is
done by comparing `FileID` and `Offset`; when the `FileID` is the same it means
the locations are within the same TU and the `Offset` is used.

FileID, from the source code: "A mostly-opaque identifier, where 0 is
"invalid", >0 is this module, and <-1 is something loaded from another
module.". That said, when de-serializing SourceLocations, FileID's from
RawComments loaded from other modules get negative IDs where previously they
were positive. This makes imported RawComments unsorted, leading to a wrong
merge with other comments from the current TU. Fix that by sorting RawComments
properly after de-serialization and before merge.

This fixes an assertion in `ASTContext::getRawCommentForDeclNoCache`,
which fires only in a debug build of clang.

Differential Revision: https://reviews.llvm.org/D27546

rdar://problem/29287314

llvm-svn: 290134
2016-12-19 21:06:06 +00:00
clang [ASTReader] Sort RawComments before merging 2016-12-19 21:06:06 +00:00
clang-tools-extra [clang-tidy] Remove duplicated check from move-constructor-init 2016-12-17 20:23:14 +00:00
compiler-rt Fixup for r290119: Only run debug_alloc_stack.cc on Darwin until I figure out how to make it work on Linux. 2016-12-19 18:54:34 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Fix build since r286752. 2016-11-14 16:06:33 +00:00
libcxx [CMake] Fix issue reported on sanitizer bots 2016-12-17 21:28:24 +00:00
libcxxabi [libc++abi] Mark failing test on Darwin as XFAIL 2016-12-13 02:43:04 +00:00
libunwind EHABI: mark some functions as exported 2016-11-17 23:53:35 +00:00
lld [ELF] - Implemented --retain-symbols-file option 2016-12-19 18:00:52 +00:00
lldb Expression evaluation for overloaded C functions (redux) 2016-12-19 17:22:44 +00:00
llgo [llgo] Remove support for LLVM attributes 2016-12-06 19:22:04 +00:00
llvm [TargetInstrInfo] replace redundant expression in getMemOpBaseRegImmOfs 2016-12-19 21:02:41 +00:00
openmp Follow up to r289732: Update comments in source files to reference .cpp files 2016-12-14 23:01:24 +00:00
parallel-libs [Acxxel] Remove setActiveDeviceForThread 2016-10-28 00:54:02 +00:00
polly Fix clang-format 2016-12-19 14:06:40 +00:00