diff options
author | David Blaikie <dblaikie@gmail.com> | 2011-09-22 01:35:49 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2011-09-22 01:35:49 +0000 |
commit | 441417a954410d87894c792fb895fe082cb0519b (patch) | |
tree | e7a4ea7499ebdc4d7ae885c72052dd27e351a330 /clang/lib/Lex/PTHLexer.cpp | |
parent | 0886e5657b696b7955111359664834b65fd28b6d (diff) | |
download | bcm5719-llvm-441417a954410d87894c792fb895fe082cb0519b.tar.gz bcm5719-llvm-441417a954410d87894c792fb895fe082cb0519b.zip |
Simplify the last character check.
llvm-svn: 140287
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r-- | clang/lib/Lex/PTHLexer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp index 3fd4b55bbdf..0d48ade39e4 100644 --- a/clang/lib/Lex/PTHLexer.cpp +++ b/clang/lib/Lex/PTHLexer.cpp @@ -575,7 +575,7 @@ IdentifierInfo* PTHManager::LazilyCreateIdentifierInfo(unsigned PersistentID) { IdentifierInfo* PTHManager::get(StringRef Name) { PTHStringIdLookup& SL = *((PTHStringIdLookup*)StringIdLookup); // Double check our assumption that the last character isn't '\0'. - assert(Name.empty() || Name.data()[Name.size()-1] != '\0'); + assert(Name.empty() || Name.back() != '\0'); PTHStringIdLookup::iterator I = SL.find(std::make_pair(Name.data(), Name.size())); if (I == SL.end()) // No identifier found? |