<feed xmlns='http://www.w3.org/2005/Atom'>
<title>clang/lib/Lex/Preprocessor.cpp, branch master</title>
<subtitle>Unofficial clang GIT mirror used in EmbToolkit
</subtitle>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/'/>
<entry>
<title>Convert StringLiteralParser constructor to use ArrayRef instead of a pointer and count.</title>
<updated>2014-06-26T04:58:39+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@gmail.com</email>
</author>
<published>2014-06-26T04:58:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=ba3d7511363852fe6969bba7f3be128b3a49d576'/>
<id>ba3d7511363852fe6969bba7f3be128b3a49d576</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211763 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211763 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[C++11] Use 'nullptr'.</title>
<updated>2014-06-09T02:04:02+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@gmail.com</email>
</author>
<published>2014-06-09T02:04:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=e4fb2d3430ca2002316f9f0c9374f2c0b749d151'/>
<id>e4fb2d3430ca2002316f9f0c9374f2c0b749d151</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210448 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210448 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>[C++11] Use 'nullptr'. Lex edition.</title>
<updated>2014-05-17T23:10:59+00:00</updated>
<author>
<name>Craig Topper</name>
<email>craig.topper@gmail.com</email>
</author>
<published>2014-05-17T23:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=da176c6d6aee673ade66dbaa5065a035331e30db'/>
<id>da176c6d6aee673ade66dbaa5065a035331e30db</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209083 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209083 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Provide and use a safe Token::getRawIdentifier() accessor</title>
<updated>2014-05-17T04:53:25+00:00</updated>
<author>
<name>Alp Toker</name>
<email>alp@nuanti.com</email>
</author>
<published>2014-05-17T04:53:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=9db67864c522312bf596a17cd260d8567af669d1'/>
<id>9db67864c522312bf596a17cd260d8567af669d1</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209061 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209061 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename SourceManager::createFileIDForMemBuffer()</title>
<updated>2014-05-16T17:23:01+00:00</updated>
<author>
<name>Alp Toker</name>
<email>alp@nuanti.com</email>
</author>
<published>2014-05-16T17:23:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=a4ba244cd4729b72b7b0be67493ea36618545790'/>
<id>a4ba244cd4729b72b7b0be67493ea36618545790</id>
<content type='text'>
It makes more sense to just overload createFileID().

Gardening only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209002 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It makes more sense to just overload createFileID().

Gardening only.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209002 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Don't leak MacroArgs when using code completion, PR19688.</title>
<updated>2014-05-09T18:09:42+00:00</updated>
<author>
<name>Nico Weber</name>
<email>nicolasweber@gmx.de</email>
</author>
<published>2014-05-09T18:09:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=3ae09ee2ed3e345e33b8350149b09eb64d913e81'/>
<id>3ae09ee2ed3e345e33b8350149b09eb64d913e81</id>
<content type='text'>
MacroArgs are owned by TokenLexer, and when a TokenLexer is destroyed, it'll
call its MacroArgs's destroy() method.  destroy() only appends the MacroArg to
Preprocessor's MacroArgCache list, and Preprocessor's destructor then calls
deallocate() on all MacroArgs in that list.  This method then ends up freeing
the MacroArgs's memory.

In a code completion context, Parser::cutOffParsing() gets called when a code
completion token is hit, which changes the type of the current token to
tok::eof.  eof tokens aren't always ConsumeToken()ed, so
Preprocessor::HandleEndOfFile() isn't always called, and that function is
responsible for popping the macro stack.

Due to this, Preprocessor::CurTokenLexer can be non-NULL when
~Preprocessor runs.  It's a unique_ptr, so it ended up being destructed after
~Preprocessor completed, and its MacroArgs thus got added to the freelist after
the code freeing things on the freelist had already completed.  The fix is to
explicitly call reset() before the freelist processing happens.  (See the bug
for more notes.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208438 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
MacroArgs are owned by TokenLexer, and when a TokenLexer is destroyed, it'll
call its MacroArgs's destroy() method.  destroy() only appends the MacroArg to
Preprocessor's MacroArgCache list, and Preprocessor's destructor then calls
deallocate() on all MacroArgs in that list.  This method then ends up freeing
the MacroArgs's memory.

In a code completion context, Parser::cutOffParsing() gets called when a code
completion token is hit, which changes the type of the current token to
tok::eof.  eof tokens aren't always ConsumeToken()ed, so
Preprocessor::HandleEndOfFile() isn't always called, and that function is
responsible for popping the macro stack.

Due to this, Preprocessor::CurTokenLexer can be non-NULL when
~Preprocessor runs.  It's a unique_ptr, so it ended up being destructed after
~Preprocessor completed, and its MacroArgs thus got added to the freelist after
the code freeing things on the freelist had already completed.  The fix is to
explicitly call reset() before the freelist processing happens.  (See the bug
for more notes.)


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208438 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Reformat code following Preprocessor constructor updates</title>
<updated>2014-05-02T03:43:38+00:00</updated>
<author>
<name>Alp Toker</name>
<email>alp@nuanti.com</email>
</author>
<published>2014-05-02T03:43:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=ad0a05027b6fdad731b5d632137db65b33880d91'/>
<id>ad0a05027b6fdad731b5d632137db65b33880d91</id>
<content type='text'>
Landing this separately to make the previous commits easy to follow at home.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207826 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Landing this separately to make the previous commits easy to follow at home.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207826 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Factor TargetInfo pointer/DelayInitialization bool pair out of Preprocessor ctor</title>
<updated>2014-05-02T03:43:30+00:00</updated>
<author>
<name>Alp Toker</name>
<email>alp@nuanti.com</email>
</author>
<published>2014-05-02T03:43:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=e36c959c4dca91ff6d63f59a912a1240b846e19d'/>
<id>e36c959c4dca91ff6d63f59a912a1240b846e19d</id>
<content type='text'>
The Preprocessor::Initialize() function already offers a clear interface to
achieve this, further reducing the confusing number of states a newly
constructed preprocessor can have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207825 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The Preprocessor::Initialize() function already offers a clear interface to
achieve this, further reducing the confusing number of states a newly
constructed preprocessor can have.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207825 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove unused IncrProcessing parameter from Preprocessor ctor</title>
<updated>2014-05-02T03:43:21+00:00</updated>
<author>
<name>Alp Toker</name>
<email>alp@nuanti.com</email>
</author>
<published>2014-05-02T03:43:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=850a105f72797a8e194a2b139432f63d9037cbd3'/>
<id>850a105f72797a8e194a2b139432f63d9037cbd3</id>
<content type='text'>
Preprocessor::enableIncrementalProcessing() provides a consistent interface to
enable the feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207824 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Preprocessor::enableIncrementalProcessing() provides a consistent interface to
enable the feature.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207824 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
<entry>
<title>Preprocessor: Clarify the ownership of the IncludeMacroStack with unique_ptr.</title>
<updated>2014-03-15T16:40:40+00:00</updated>
<author>
<name>Benjamin Kramer</name>
<email>benny.kra@googlemail.com</email>
</author>
<published>2014-03-15T16:40:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.embtoolkit.org/clang/commit/?id=ec4d626ce2f86e0a2a87f996b23c501f14ba86a8'/>
<id>ec4d626ce2f86e0a2a87f996b23c501f14ba86a8</id>
<content type='text'>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204007 91177308-0d34-0410-b5e6-96231b3b80d8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204007 91177308-0d34-0410-b5e6-96231b3b80d8
</pre>
</div>
</content>
</entry>
</feed>
