summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CommentCommandTraits.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-05-09 16:44:02 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-05-09 16:44:02 +0000
commit395a6d48780ff68ef0944630232df05925c17e31 (patch)
tree734c5ae9f65a5b185f299803f1c787ca278462d9 /clang/lib/AST/CommentCommandTraits.cpp
parent1333fa3d68deae7aa978849b3a642dedb09e82ca (diff)
downloadbcm5719-llvm-395a6d48780ff68ef0944630232df05925c17e31.tar.gz
bcm5719-llvm-395a6d48780ff68ef0944630232df05925c17e31.zip
[doc parsing]: So, in this patch, single character
'commands' will not go through typo fixit logic, preserving the old behavior (no typo, no diagnostics). // rdar://12381408 llvm-svn: 181521
Diffstat (limited to 'clang/lib/AST/CommentCommandTraits.cpp')
-rw-r--r--clang/lib/AST/CommentCommandTraits.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/clang/lib/AST/CommentCommandTraits.cpp b/clang/lib/AST/CommentCommandTraits.cpp
index 2b5e624fb71..dc4744a53c5 100644
--- a/clang/lib/AST/CommentCommandTraits.cpp
+++ b/clang/lib/AST/CommentCommandTraits.cpp
@@ -49,10 +49,6 @@ HelperTypoCorrectCommandInfo(SmallVectorImpl<const CommandInfo *> &BestCommand,
const unsigned MaxEditDistance = 1;
unsigned BestEditDistance = MaxEditDistance + 1;
StringRef Name = Command->Name;
- // Don't attempt trying to typo fix single character commands.
- // \t and \n are very common
- if (Name.size() <= 1)
- return;
unsigned MinPossibleEditDistance = abs((int)Name.size() - (int)Typo.size());
if (MinPossibleEditDistance > 0 &&
OpenPOWER on IntegriCloud