<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On May 9, 2013, at 10:01 AM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Thu, May 9, 2013 at 7:44 PM, Fariborz Jahanian <<a href="mailto:fjahanian@apple.com">fjahanian@apple.com</a>> wrote:<br><blockquote type="cite">Author: fjahanian<br>Date: Thu May  9 11:44:02 2013<br>New Revision: 181521<br><br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project?rev=181521&view=rev">http://llvm.org/viewvc/llvm-project?rev=181521&view=rev</a><br>Log:<br>[doc parsing]: So, in this patch, single character<br>'commands' will not go through typo fixit logic,<br>preserving the old behavior (no typo, no diagnostics).<br>//<span class="Apple-converted-space"> </span><a href="rdar://12381408">rdar://12381408</a><br><br>Modified:<br>   cfe/trunk/lib/AST/CommentCommandTraits.cpp<br>   cfe/trunk/lib/AST/CommentLexer.cpp<br><br>Modified: cfe/trunk/lib/AST/CommentCommandTraits.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentCommandTraits.cpp?rev=181521&r1=181520&r2=181521&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentCommandTraits.cpp?rev=181521&r1=181520&r2=181521&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/AST/CommentCommandTraits.cpp (original)<br>+++ cfe/trunk/lib/AST/CommentCommandTraits.cpp Thu May  9 11:44:02 2013<br>@@ -49,10 +49,6 @@ HelperTypoCorrectCommandInfo(SmallVector<br>  const unsigned MaxEditDistance = 1;<br>  unsigned BestEditDistance = MaxEditDistance + 1;<br>  StringRef Name = Command->Name;<br>-  // Don't attempt trying to typo fix single character commands.<br>-  // \t and \n are very common<br>-  if (Name.size() <= 1)<br>-    return;<br><br>  unsigned MinPossibleEditDistance = abs((int)Name.size() - (int)Typo.size());<br>  if (MinPossibleEditDistance > 0 &&<br><br>Modified: cfe/trunk/lib/AST/CommentLexer.cpp<br>URL:<span class="Apple-converted-space"> </span><a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentLexer.cpp?rev=181521&r1=181520&r2=181521&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/CommentLexer.cpp?rev=181521&r1=181520&r2=181521&view=diff</a><br>==============================================================================<br>--- cfe/trunk/lib/AST/CommentLexer.cpp (original)<br>+++ cfe/trunk/lib/AST/CommentLexer.cpp Thu May  9 11:44:02 2013<br>@@ -355,6 +355,10 @@ void Lexer::lexCommentText(Token &T) {<br>        if (!Info) {<br>          formTokenWithChars(T, TokenPtr, tok::unknown_command);<br>          T.setUnknownCommandName(CommandName);<br>+          // single character command impostures, such as \t or \n must not go<br>+          // through the fixit logic.<br>+          if (CommandName.size() <= 1)<br>+            return;<br></blockquote><br>But it should still get a pedantic<br>diag::warn_unknown_comment_command_name diagnostic.<br></div></blockquote><div><br></div>Are you sure. I intentionally left it out. It is going to be noisy with pedantic.</div><div><br></div><div>- Fariborz</div><div><br><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br>Dmitri<br><br>--<br>main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/</div></blockquote></div><br></body></html>