diff options
| author | Alexander Kornienko <alexfh@google.com> | 2013-09-16 20:20:49 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2013-09-16 20:20:49 +0000 |
| commit | 2c2f729d10cb10324bf2e7871867f7bbc19ad358 (patch) | |
| tree | 5c89391afc990883a28e1caaf2c8959a5b5f6fbf /lib/Format/WhitespaceManager.cpp | |
| parent | e1668a3a07a048eb5520410119b8b06787bfcc10 (diff) | |
| download | clang-2c2f729d10cb10324bf2e7871867f7bbc19ad358.tar.gz clang-2c2f729d10cb10324bf2e7871867f7bbc19ad358.tar.bz2 clang-2c2f729d10cb10324bf2e7871867f7bbc19ad358.tar.xz | |
When in pre-c++11 mode, treat _T("xxx") as a single string literal, repeat the _T() part around each fragment. This addresses http://llvm.org/PR17122
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits, klimek, rsmith
Differential Revision: http://llvm-reviews.chandlerc.com/D1640
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190804 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Format/WhitespaceManager.cpp')
| -rw-r--r-- | lib/Format/WhitespaceManager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/Format/WhitespaceManager.cpp b/lib/Format/WhitespaceManager.cpp index 4138442c0c..c0a3f5d60b 100644 --- a/lib/Format/WhitespaceManager.cpp +++ b/lib/Format/WhitespaceManager.cpp @@ -49,11 +49,9 @@ void WhitespaceManager::replaceWhitespace(const FormatToken &Tok, void WhitespaceManager::addUntouchableToken(const FormatToken &Tok, bool InPPDirective) { - Changes.push_back( - Change(false, Tok.WhitespaceRange, /*Spaces=*/0, - SourceMgr.getSpellingColumnNumber(Tok.Tok.getLocation()) - 1, - Tok.NewlinesBefore, "", "", Tok.Tok.getKind(), - InPPDirective && !Tok.IsFirst)); + Changes.push_back(Change(false, Tok.WhitespaceRange, /*Spaces=*/0, + Tok.OriginalColumn, Tok.NewlinesBefore, "", "", + Tok.Tok.getKind(), InPPDirective && !Tok.IsFirst)); } void WhitespaceManager::replaceWhitespaceInToken( |
