diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-05-09 08:15:10 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-05-09 08:15:10 +0000 |
commit | 2145bc02291df82c182dedf38293c355c99ed869 (patch) | |
tree | d06e3d6ed185ee90afd7331f9a717fa48c28718b /clang/lib/Format/ContinuationIndenter.cpp | |
parent | 2fc43a38213ed8dce70ccf16244c9800e38eae41 (diff) | |
download | bcm5719-llvm-2145bc02291df82c182dedf38293c355c99ed869.tar.gz bcm5719-llvm-2145bc02291df82c182dedf38293c355c99ed869.zip |
[C++11] Use 'nullptr'.
llvm-svn: 208392
Diffstat (limited to 'clang/lib/Format/ContinuationIndenter.cpp')
-rw-r--r-- | clang/lib/Format/ContinuationIndenter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp index 9b8880ac34e..5c2bdc52171 100644 --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -29,7 +29,7 @@ namespace format { // Returns the length of everything up to the first possible line break after // the ), ], } or > matching \c Tok. static unsigned getLengthToMatchingParen(const FormatToken &Tok) { - if (Tok.MatchingParen == NULL) + if (!Tok.MatchingParen) return 0; FormatToken *End = Tok.MatchingParen; while (End->Next && !End->Next->CanBreakBefore) { @@ -220,7 +220,7 @@ unsigned ContinuationIndenter::addTokenToState(LineState &State, bool Newline, assert(!State.Stack.empty()); if ((Current.Type == TT_ImplicitStringLiteral && - (Current.Previous->Tok.getIdentifierInfo() == NULL || + (Current.Previous->Tok.getIdentifierInfo() == nullptr || Current.Previous->Tok.getIdentifierInfo()->getPPKeywordID() == tok::pp_not_keyword))) { // FIXME: Is this correct? @@ -916,7 +916,7 @@ unsigned ContinuationIndenter::breakProtrudingToken(const FormatToken &Current, Current, State.Line->Level, StartColumn, Current.OriginalColumn, !Current.Previous, State.Line->InPPDirective, Encoding, Style)); } else if (Current.Type == TT_LineComment && - (Current.Previous == NULL || + (Current.Previous == nullptr || Current.Previous->Type != TT_ImplicitStringLiteral)) { if (CommentPragmasRegex.match(Current.TokenText.substr(2))) return 0; |