forked from OSchip/llvm-project
Remove uses of SmallString::equals in favor of SmallVectorImpl<char>'s operator==
llvm-svn: 203373
This commit is contained in:
parent
0098a4bd04
commit
dcb72d72ff
|
@ -1373,7 +1373,7 @@ void StringLiteralParser::init(const Token *StringToks, unsigned NumStringToks){
|
||||||
// result of a concatenation involving at least one user-defined-string-
|
// result of a concatenation involving at least one user-defined-string-
|
||||||
// literal, all the participating user-defined-string-literals shall
|
// literal, all the participating user-defined-string-literals shall
|
||||||
// have the same ud-suffix.
|
// have the same ud-suffix.
|
||||||
if (!UDSuffixBuf.equals(UDSuffix)) {
|
if (UDSuffixBuf != UDSuffix) {
|
||||||
if (Diags) {
|
if (Diags) {
|
||||||
SourceLocation TokLoc = StringToks[i].getLocation();
|
SourceLocation TokLoc = StringToks[i].getLocation();
|
||||||
Diags->Report(TokLoc, diag::err_string_concat_mixed_suffix)
|
Diags->Report(TokLoc, diag::err_string_concat_mixed_suffix)
|
||||||
|
|
|
@ -120,7 +120,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name,
|
||||||
// Normalize the attribute name, __foo__ becomes foo. This is only allowable
|
// Normalize the attribute name, __foo__ becomes foo. This is only allowable
|
||||||
// for GNU attributes.
|
// for GNU attributes.
|
||||||
bool IsGNU = SyntaxUsed == AS_GNU || (SyntaxUsed == AS_CXX11 &&
|
bool IsGNU = SyntaxUsed == AS_GNU || (SyntaxUsed == AS_CXX11 &&
|
||||||
FullName.equals("gnu"));
|
FullName == "gnu");
|
||||||
if (IsGNU && AttrName.size() >= 4 && AttrName.startswith("__") &&
|
if (IsGNU && AttrName.size() >= 4 && AttrName.startswith("__") &&
|
||||||
AttrName.endswith("__"))
|
AttrName.endswith("__"))
|
||||||
AttrName = AttrName.slice(2, AttrName.size() - 2);
|
AttrName = AttrName.slice(2, AttrName.size() - 2);
|
||||||
|
|
Loading…
Reference in New Issue