aboutsummaryrefslogtreecommitdiff
path: root/Basic/IdentifierTable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Basic/IdentifierTable.cpp')
-rw-r--r--Basic/IdentifierTable.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Basic/IdentifierTable.cpp b/Basic/IdentifierTable.cpp
index 51abcd22b5..7c2681615f 100644
--- a/Basic/IdentifierTable.cpp
+++ b/Basic/IdentifierTable.cpp
@@ -157,6 +157,7 @@ tok::PPKeywordKind IdentifierInfo::getPPKeywordID() const {
return memcmp(Name, #NAME, LEN) ? tok::pp_not_keyword : tok::pp_ ## NAME
unsigned Len = getLength();
+ if (Len < 2) return tok::pp_not_keyword;
const char *Name = getName();
switch (HASH(Len, Name[0], Name[2])) {
default: return tok::pp_not_keyword;