summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/typo-correction-delayed.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-04-26 22:45:04 +0000
committerRui Ueyama <ruiu@google.com>2017-04-26 22:45:04 +0000
commit3670d2ef78fea4d7d5701092648022a21b977c16 (patch)
tree8c4770e9c6ecd92a5fb71cbd9639d7d0cc86607b /test/SemaCXX/typo-correction-delayed.cpp
parentbf6842052af7c4bbd3ee86674ef5dba8796ac0ae (diff)
Replace HashString algorithm with xxHash64
The previous algorithm processed one character at a time, which is very painful on a modern CPU. Replace it with xxHash64, which both already exists in the codebase and is fairly fast. Patch from Scott Smith! Differential Revision: https://reviews.llvm.org/D32509 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@301487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/typo-correction-delayed.cpp')
-rw-r--r--test/SemaCXX/typo-correction-delayed.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/SemaCXX/typo-correction-delayed.cpp b/test/SemaCXX/typo-correction-delayed.cpp
index 610d439713..11d54006f3 100644
--- a/test/SemaCXX/typo-correction-delayed.cpp
+++ b/test/SemaCXX/typo-correction-delayed.cpp
@@ -52,6 +52,7 @@ void testNoCandidates() {
}
class string {};
+
struct Item {
void Nest();
string text();
@@ -88,12 +89,16 @@ void f(LinkedNode *node) {
struct NestedNode {
NestedNode* Nest();
NestedNode* next();
- string text() const;
+ // Note, this test is dependent on the order in which identifiers are passed
+ // to the typo corrector, which is based on the hash function used. For
+ // consistency, I am making the next keyword the first identifier returned.
+ string eext() const;
};
void f(NestedNode *node) {
// There are two equidistant, usable corrections for Next: next and Nest
NestedNode *next = node->Next(); // expected-error-re {{no member named 'Next' in 'initializerCorrections::NestedNode'{{$}}}}
}
+
}
namespace PR21669 {