[Lldb-commits] [PATCH] D42939: More correct handling of error cases C++ name parser
Eugene Zemtsov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Feb 5 16:50:59 PST 2018
eugene updated this revision to Diff 132916.
eugene added a comment.
fix formating
https://reviews.llvm.org/D42939
Files:
source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
Index: unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
===================================================================
--- unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
+++ unittests/Language/CPlusPlus/CPlusPlusLanguageTest.cpp
@@ -160,4 +160,6 @@
"selector:otherField:", context, basename));
EXPECT_FALSE(CPlusPlusLanguage::ExtractContextAndIdentifier(
"abc::", context, basename));
+ EXPECT_FALSE(CPlusPlusLanguage::ExtractContextAndIdentifier(
+ "f<A<B><C>>", context, basename));
}
Index: source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
===================================================================
--- source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
+++ source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp
@@ -242,8 +242,7 @@
}
}
- assert(template_counter >= 0);
- if (template_counter > 0) {
+ if (template_counter != 0) {
return false;
}
start_position.Remove();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42939.132916.patch
Type: text/x-patch
Size: 970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180206/8bf065e4/attachment.bin>
More information about the lldb-commits
mailing list