[llvm-commits] [LLVM, llvm-mc] bugfix for bug #10869: Unclear error for files without newline at the end of file (ARM, x86).

Stepan Dyatkovskiy STPWORLD at yandex.ru
Wed Sep 14 02:47:42 PDT 2011


Hi Jim,

Please find patch attached.
This patch contains another variant of bugfix. llvm-mc after this will report warning "Missed newline at the end of file".

Few words about AsmLexer.cpp, LexToken method.
Here I found static variable IsAtStartOfLine (string #356). As I understood it is supposed that this flag should be true always when EndOfStatement is returned.
Is so, there are some missed cases:
1. Inside the LexToken method, "if (isAtStatementSeparator(TokStart)) {" branch. EndOfStatement is returned, but isAtStartOfLine is not changed.
2. Inside the LexComment... Should IsAtStartOfLine be static? It seems that it should be a private member...
I also fixed it in my patch.

Regards,
Stepan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bugfix10869-with-warn.patch
Type: application/octet-stream
Size: 6613 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110914/6dea4ea1/attachment.obj>


More information about the llvm-commits mailing list