The purpose of this patch is to keep the same functionality without using LookupResult's implicit copy ctor and assignment operator, because they cause warnings when -Wdeprecated is passed.
This patch is meant to help the following review: http://reviews.llvm.org/D18123.
Details
Details
- Reviewers
hintonda dblaikie rjmccall rnk - Commits
- rGd6d8b315d394: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid…
rC263630: Avoid using LookupResult's implicit copy ctor and assignment operator to avoid…
rL263630: Avoid using LookupResult's implicit copy ctor and assignment operator to…
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
You can't call getFoundDecl() if !isSingleResult(). You should add a test case that actually tests the possibility that this lookup will fail.
Comment Actions
How can I create a test case where isSingleResult() returns false?
I don't see existent tests in the commit that added this method's functionality.
Comment Actions
Hmm. Checking whether LookupName returns false will catch a lot of simple cases. I think the test case you need might have to be a lookup that finds multiple overloads of a function in C++.