summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/AttributeList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/AttributeList.cpp')
-rw-r--r--clang/lib/Sema/AttributeList.cpp4
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;
OpenPOWER on IntegriCloud