]> granicus.if.org Git - clang/commit
enhance sourcemgr to detect various UTF BOM's and emit a fatal error
authorChris Lattner <sabre@nondot.org>
Tue, 20 Apr 2010 18:14:03 +0000 (18:14 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 20 Apr 2010 18:14:03 +0000 (18:14 +0000)
commit38caec48bc1c9816ca59b8d164a64447ee208c2e
tree05cc5f0627b5ea5c3dd380bb12354b3fd0a58376
parent3e79c30807c516e8d32e4ed08408b30605df5997
enhance sourcemgr to detect various UTF BOM's and emit a fatal error
about it instead of producing tons of garbage from the lexer.

It would be even better for sourcemgr to dynamically transcode (e.g.
from UTF16 -> UTF8).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@101924 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/DiagnosticCommonKinds.td
lib/Basic/SourceManager.cpp
test/Lexer/utf-16.c [new file with mode: 0644]
test/Lexer/utf-16.c.txt [new file with mode: 0644]