AttributeList: tweak the conditional order to avoid two strcmps
llvm-svn: 196518
diff --git a/clang/lib/Sema/AttributeList.cpp b/clang/lib/Sema/AttributeList.cpp
index aa7f9df..023069c 100644
--- a/clang/lib/Sema/AttributeList.cpp
+++ b/clang/lib/Sema/AttributeList.cpp
@@ -122,8 +122,8 @@
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;