diff options
author | Kaelyn Uhrain <rikka@google.com> | 2013-04-03 16:59:49 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2013-04-03 16:59:49 +0000 |
commit | 989b7ca0922104157e76bc8520cc1bc1affb0304 (patch) | |
tree | 8286e790cc6dfe051a276b2f5813f5e964b3fb40 /clang/lib/Parse/ParseTentative.cpp | |
parent | 80031d9fc45f9d647a1462d74a44d8070da672bb (diff) | |
download | bcm5719-llvm-989b7ca0922104157e76bc8520cc1bc1affb0304.tar.gz bcm5719-llvm-989b7ca0922104157e76bc8520cc1bc1affb0304.zip |
Give the default CorrectionCandidateCallback::ValidateCandidate some
smarts so that it doesn't approve of keywords and/or type names when it
knows (based on its flags) that those kinds of corrections are not
wanted.
llvm-svn: 178668
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index fe602f6b658..5e0ef2b83f6 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -999,6 +999,7 @@ Parser::isCXXDeclarationSpecifier(Parser::TPResult BracedCastResult, // to types and identifiers, in order to try to recover from errors. CorrectionCandidateCallback TypoCorrection; TypoCorrection.WantRemainingKeywords = false; + TypoCorrection.WantTypeSpecifiers = Next.isNot(tok::arrow); switch (TryAnnotateName(false /* no nested name specifier */, &TypoCorrection)) { case ANK_Error: |