diff options
author | Kaelyn Uhrain <rikka@google.com> | 2011-09-14 19:37:32 +0000 |
---|---|---|
committer | Kaelyn Uhrain <rikka@google.com> | 2011-09-14 19:37:32 +0000 |
commit | 7c24334bedf59bd9af57ee53eb8f6d9f6a50ca9b (patch) | |
tree | 5e93a490e612f040394585ae80dc2f62017a8339 /include/clang/Sema/TypoCorrection.h | |
parent | f45b357c0d0df99e160a6320e279ef788dd91ba6 (diff) |
Plug an abstraction leak and fix a crasher in DiagnoseInvalidRedeclaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139718 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Sema/TypoCorrection.h')
-rw-r--r-- | include/clang/Sema/TypoCorrection.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/clang/Sema/TypoCorrection.h b/include/clang/Sema/TypoCorrection.h index 480a71af89..9537c3031d 100644 --- a/include/clang/Sema/TypoCorrection.h +++ b/include/clang/Sema/TypoCorrection.h @@ -118,7 +118,9 @@ public: } typedef llvm::SmallVector<NamedDecl*, 1>::iterator decl_iterator; - decl_iterator begin() { return CorrectionDecls.begin(); } + decl_iterator begin() { + return isKeyword() ? CorrectionDecls.end() : CorrectionDecls.begin(); + } decl_iterator end() { return CorrectionDecls.end(); } private: |