diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-03-31 17:46:05 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-03-31 17:46:05 +0000 |
commit | a771f46c82d7986ba0ceb0a8b656de1b28eacf49 (patch) | |
tree | 1d52ccd9051ed70479f9d0b30e33e9473960cc5e /clang/lib/Lex | |
parent | c1d2d8a0143f6b8466f5c02932d0ad0021e479fc (diff) | |
download | bcm5719-llvm-a771f46c82d7986ba0ceb0a8b656de1b28eacf49.tar.gz bcm5719-llvm-a771f46c82d7986ba0ceb0a8b656de1b28eacf49.zip |
Reinstate my CodeModificationHint -> FixItHint renaming patch, without
the C-only "optimization".
llvm-svn: 100022
Diffstat (limited to 'clang/lib/Lex')
-rw-r--r-- | clang/lib/Lex/Lexer.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Lex/PPDirectives.cpp | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/Lex/Lexer.cpp b/clang/lib/Lex/Lexer.cpp index 2f89142409a..19f25ea4a8b 100644 --- a/clang/lib/Lex/Lexer.cpp +++ b/clang/lib/Lex/Lexer.cpp @@ -1372,8 +1372,7 @@ bool Lexer::LexEndOfFile(Token &Result, const char *CurPtr) { // a pedwarn. if (CurPtr != BufferStart && (CurPtr[-1] != '\n' && CurPtr[-1] != '\r')) Diag(BufferEnd, diag::ext_no_newline_eof) - << CodeModificationHint::CreateInsertion(getSourceLocation(BufferEnd), - "\n"); + << FixItHint::CreateInsertion(getSourceLocation(BufferEnd), "\n"); BufferPtr = CurPtr; diff --git a/clang/lib/Lex/PPDirectives.cpp b/clang/lib/Lex/PPDirectives.cpp index 7b601010b20..757ba9014df 100644 --- a/clang/lib/Lex/PPDirectives.cpp +++ b/clang/lib/Lex/PPDirectives.cpp @@ -127,10 +127,10 @@ void Preprocessor::CheckEndOfDirective(const char *DirType, bool EnableMacros) { // Add a fixit in GNU/C99/C++ mode. Don't offer a fixit for strict-C89, // because it is more trouble than it is worth to insert /**/ and check that // there is no /**/ in the range also. - CodeModificationHint FixItHint; + FixItHint Hint; if (Features.GNUMode || Features.C99 || Features.CPlusPlus) - FixItHint = CodeModificationHint::CreateInsertion(Tmp.getLocation(),"//"); - Diag(Tmp, diag::ext_pp_extra_tokens_at_eol) << DirType << FixItHint; + Hint = FixItHint::CreateInsertion(Tmp.getLocation(),"//"); + Diag(Tmp, diag::ext_pp_extra_tokens_at_eol) << DirType << Hint; DiscardUntilEndOfDirective(); } } |