diff options
| author | Alp Toker <alp@nuanti.com> | 2013-12-05 18:04:42 +0000 | 
|---|---|---|
| committer | Alp Toker <alp@nuanti.com> | 2013-12-05 18:04:42 +0000 | 
| commit | a31d1dd179e8a40982b723b7070f1724c51e6224 (patch) | |
| tree | 4ee5237c99984d1a80a7045720de444ebc56d581 /clang/lib/Sema | |
| parent | 5a22df498e856b96018d66cdaeeb2e4c27be7b6b (diff) | |
| download | bcm5719-llvm-a31d1dd179e8a40982b723b7070f1724c51e6224.tar.gz bcm5719-llvm-a31d1dd179e8a40982b723b7070f1724c51e6224.zip | |
AttributeList: tweak the conditional order to avoid two strcmps
llvm-svn: 196518
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/AttributeList.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/clang/lib/Sema/AttributeList.cpp b/clang/lib/Sema/AttributeList.cpp index aa7f9df6bca..023069c35b8 100644 --- a/clang/lib/Sema/AttributeList.cpp +++ b/clang/lib/Sema/AttributeList.cpp @@ -122,8 +122,8 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name,    StringRef AttrName = Name->getName();    // Normalize the attribute name, __foo__ becomes foo. -  if (AttrName.startswith("__") && AttrName.endswith("__") && -      AttrName.size() >= 4) +  if (AttrName.size() >= 4 && AttrName.startswith("__") && +      AttrName.endswith("__"))      AttrName = AttrName.substr(2, AttrName.size() - 4);    SmallString<64> Buf; | 

