]> granicus.if.org Git - clang/commit
For assigning SourceLocations to macro arg tokens, reserve a single SLocEntry
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 19 Aug 2011 22:34:17 +0000 (22:34 +0000)
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>
Fri, 19 Aug 2011 22:34:17 +0000 (22:34 +0000)
commitd60a34a4e514ec0dfddd05ef2744be104e111f45
treee5614b539c280236948485ec7e92384458d495e8
parentec3b5389a5032433116ec2f2ee266b9666ad2eb4
For assigning SourceLocations to macro arg tokens, reserve a single SLocEntry
for tokens that are lexed consecutively from the same FileID, instead of creating
a SLocEntry for each token. e.g for

   assert(foo == bar);

there will be a single SLocEntry for the "foo == bar" chunk and locations
for the 'foo', '==', 'bar' tokens will point inside that chunk.

For parsing SemaExpr.cpp, this reduced the number of SLocEntries by 25%.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138129 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/SourceManager.h
include/clang/Lex/TokenLexer.h
lib/Lex/TokenLexer.cpp