summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-06-23 22:57:51 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-06-23 22:57:51 +0000
commitee28b09421d031c938fe1526bcbbabdf0bf96c59 (patch)
tree2da435cd16920bf2f8273fee29cbd414cd98b7a8 /include
parent42988461bb266eb0359f136417498b44a9f786b6 (diff)
downloadclang-ee28b09421d031c938fe1526bcbbabdf0bf96c59.tar.gz
clang-ee28b09421d031c938fe1526bcbbabdf0bf96c59.tar.bz2
clang-ee28b09421d031c938fe1526bcbbabdf0bf96c59.tar.xz
Propagate isAddressOfMember into typo correction so that we don't correct &qualified-id into &unqualified-id. Also make sure to set the naming class when we find the qualified-id in a different class than the nested name specifier specified so far. Fixes PR19681!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211551 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/clang/Sema/TypoCorrection.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h
index e5f8f4dfa2..6cab59c93e 100644
--- a/include/clang/Sema/TypoCorrection.h
+++ b/include/clang/Sema/TypoCorrection.h
@@ -250,8 +250,8 @@ public:
CorrectionCandidateCallback()
: WantTypeSpecifiers(true), WantExpressionKeywords(true),
WantCXXNamedCasts(true), WantRemainingKeywords(true),
- WantObjCSuper(false),
- IsObjCIvarLookup(false) {}
+ WantObjCSuper(false), IsObjCIvarLookup(false),
+ IsAddressOfOperand(false) {}
virtual ~CorrectionCandidateCallback() {}
@@ -287,6 +287,7 @@ public:
// Temporary hack for the one case where a CorrectTypoContext enum is used
// when looking up results.
bool IsObjCIvarLookup;
+ bool IsAddressOfOperand;
};
/// @brief Simple template class for restricting typo correction candidates