teak-llvm/clang/lib/Frontend
Logan Chien d3d385d624 Frontend: Fix SourceColumnMap assertion failure on non-ascii characters.
If there are some non-ascii character in the input source code, the
column index might be smallar than the byte index.  This will result
in two possible assertion failures.  This CL fixes the computation of
the column index and byte index.

1. The assertion in startOfNextColumn() and startOfPreviousColumn()
   should not be raised when the byte index is greater than the column
   index since the non-ascii characters may use more than one bytes to
   store a character in a column.

2. The length of the caret line should be equal to the number of columns
   of source line, instead of the length of the source line.  Otherwise,
   the assertion in selectInterestingSourceRegion will be raised because
   the removed columns plus the kept columns are not greater than the max
   column, which means that we should not remove any column at all.

llvm-svn: 225442
2015-01-08 13:19:07 +00:00
..
Rewrite Renamed RefersToEnclosingLocal bitfield to RefersToCapturedVariable. 2014-12-16 08:01:48 +00:00
ASTConsumers.cpp Modify behavior of -ast-dump-lookups: if -ast-dump is not also provided, dump 2014-08-11 22:11:07 +00:00
ASTMerge.cpp Recommit 213307: unique_ptr-ify ownership of ASTConsumers (reverted in r213325) 2014-08-10 19:56:51 +00:00
ASTUnit.cpp Make DiagnosticsEngine::takeClient return std::unique_ptr<> 2014-11-17 23:46:02 +00:00
CacheTokens.cpp Standardize on StringMap::insert, removing uses of StringMap::GetOrCreateValue. 2014-11-19 03:06:06 +00:00
ChainedDiagnosticConsumer.cpp
ChainedIncludesSource.cpp Update for LLVM api change. 2014-08-27 20:03:29 +00:00
CMakeLists.txt Move CodeGenOptions constructor out-of-line and add missing headers. NFC. 2014-11-11 00:22:12 +00:00
CodeGenOptions.cpp Move CodeGenOptions constructor out-of-line and add missing headers. NFC. 2014-11-11 00:22:12 +00:00
CompilerInstance.cpp [modules] If the same .pcm file is imported via two different paths, don't 2014-12-09 00:14:36 +00:00
CompilerInvocation.cpp Fix use-after-destruction introduced in r224924. 2014-12-29 21:28:15 +00:00
CreateInvocationFromCommandLine.cpp Driver: Use pointee_iterator rather than iterating over unique_ptrs 2014-10-03 01:04:53 +00:00
DependencyFile.cpp Update for LLVM API change 2014-11-19 02:56:13 +00:00
DependencyGraph.cpp Unique_ptrify PPCallbacks ownership. 2014-09-10 04:53:53 +00:00
DiagnosticRenderer.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 06:28:36 +00:00
FrontendAction.cpp [modules] Load .pcm files specified by -fmodule-file lazily. 2014-10-27 23:01:16 +00:00
FrontendActions.cpp [modules] Track how 'header' directives were written in module map files, 2014-12-02 00:08:08 +00:00
FrontendOptions.cpp
HeaderIncludeGen.cpp Unique_ptrify PPCallbacks ownership. 2014-09-10 04:53:53 +00:00
InitHeaderSearch.cpp Use isOSBinFormatMachO() instead of comparing the object format 2014-12-05 00:22:48 +00:00
InitPreprocessor.cpp [mips] Removing __SIZEOF_INT128__ macro for MIPS64 2014-12-10 15:44:07 +00:00
LangStandards.cpp [C++11] Use 'nullptr'. Frontend edition. 2014-05-22 04:46:25 +00:00
LayoutOverrideSource.cpp
LogDiagnosticPrinter.cpp Add DiagID and Warning Flag to DiagnosticsLog 2014-11-14 21:23:56 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00
ModuleDependencyCollector.cpp Frontend: Canonicalize to native paths when dumping module dependencies 2014-12-12 23:12:27 +00:00
MultiplexConsumer.cpp [OPENMP] Codegen for threadprivate variables 2014-11-11 04:05:39 +00:00
PrintPreprocessedOutput.cpp Avoid a couple of assertions when preprocessing with modules 2014-09-10 21:29:41 +00:00
SerializedDiagnosticPrinter.cpp Driver: Include driver diagnostics when we --serialize-diagnostics 2014-10-23 22:20:11 +00:00
SerializedDiagnosticReader.cpp Simplify code a bit by passing StreamFile to the BitstreamCursor constructor. 2014-11-12 14:42:25 +00:00
TextDiagnostic.cpp Frontend: Fix SourceColumnMap assertion failure on non-ascii characters. 2015-01-08 13:19:07 +00:00
TextDiagnosticBuffer.cpp Support 'remark' in VerifyDiagnosticConsumer 2014-05-01 14:06:01 +00:00
TextDiagnosticPrinter.cpp Remove uses of the redundant ".reset(nullptr)" of unique_ptr, in favor of ".reset()" 2014-07-19 01:06:45 +00:00
VerifyDiagnosticConsumer.cpp Make DiagnosticsEngine::takeClient return std::unique_ptr<> 2014-11-17 23:46:02 +00:00