aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/Keywords.cpp
diff options
context:
space:
mode:
authorLeandro Melo <leandro.melo@nokia.com>2011-11-18 11:40:23 +0100
committerLeandro Melo <leandro.melo@nokia.com>2011-11-18 12:14:10 +0100
commit9f73c5848bd58010b90adbe1b66f6a8b745dcfbe (patch)
treebbde1e0c97d9eae3c5024aa4f808699806f0d0c4 /src/libs/3rdparty/cplusplus/Keywords.cpp
parentfbd47e25ee1578bcd83ec09be82c2a65a83d791a (diff)
C++: Recognize C++11 constexpr
Change-Id: Iac8ba58404284f0d90fd5a3640eb9ccd7e98058d Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/Keywords.cpp')
-rw-r--r--src/libs/3rdparty/cplusplus/Keywords.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/libs/3rdparty/cplusplus/Keywords.cpp b/src/libs/3rdparty/cplusplus/Keywords.cpp
index 832639f4b0..003566c414 100644
--- a/src/libs/3rdparty/cplusplus/Keywords.cpp
+++ b/src/libs/3rdparty/cplusplus/Keywords.cpp
@@ -945,7 +945,7 @@ static inline int classify8(const char *s, bool q, bool x) {
return T_IDENTIFIER;
}
-static inline int classify9(const char *s, bool q, bool) {
+static inline int classify9(const char *s, bool q, bool x) {
if (s[0] == '_') {
if (s[1] == '_') {
if (s[2] == 'c') {
@@ -965,6 +965,25 @@ static inline int classify9(const char *s, bool q, bool) {
}
}
}
+ else if (x && s[0] == 'c') {
+ if (s[1] == 'o') {
+ if (s[2] == 'n') {
+ if (s[3] == 's') {
+ if (s[4] == 't') {
+ if (s[5] == 'e') {
+ if (s[6] == 'x') {
+ if (s[7] == 'p') {
+ if (s[8] == 'r') {
+ return T_CONSTEXPR;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
else if (s[0] == 'n') {
if (s[1] == 'a') {
if (s[2] == 'm') {