]> granicus.if.org Git - clang/commit
use the full spelling of a string literal token so that trigraphs
authorChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 18:34:12 +0000 (18:34 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 18 Feb 2009 18:34:12 +0000 (18:34 +0000)
commitd0d082f2eba4e3ed4eb467d76fd227c6dcd6cce7
treeea0e36306ec2e9ed40cc6675204d738076914864
parent07f192e1d7af64d63fd80eafd724b70a18ebfbd9
use the full spelling of a string literal token so that trigraphs
and escaped newlines don't throw off the offset computation.

On this testcase:
  printf("abc\
def"
         "%*d", (unsigned) 1, 1);

Before:
t.m:5:5: warning: field width should have type 'int', but argument has type 'unsigned int'
def"
    ^

after:
t.m:6:12: warning: field width should have type 'int', but argument has type 'unsigned int'
         "%*d", (unsigned) 1, 1);
           ^    ~~~~~~~~~~~~

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64930 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/SemaChecking.cpp
test/Sema/format-strings.c