aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
authorChristian Kamm <christian.d.kamm@nokia.com>2012-09-17 13:34:36 +0200
committerhjk <qthjk@ovi.com>2012-09-17 14:02:55 +0200
commit484d4dc26e00b2511ed1f09524803121e2374f60 (patch)
tree721bdfcd19e4035c7315fab7ea84868afae532c6 /src/libs
parent410b5cfa2a5f52e704124cae1e1275a663e66079 (diff)
C++11: Add the alignof and alignas tokens.
Change-Id: I7f60057953787b3300aafa4d3f230f10b1e9a50f Reviewed-by: hjk <qthjk@ovi.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/3rdparty/cplusplus/Keywords.cpp20
-rw-r--r--src/libs/3rdparty/cplusplus/Token.cpp2
-rw-r--r--src/libs/3rdparty/cplusplus/Token.h4
3 files changed, 24 insertions, 2 deletions
diff --git a/src/libs/3rdparty/cplusplus/Keywords.cpp b/src/libs/3rdparty/cplusplus/Keywords.cpp
index cac51a4fd6..1da78381ac 100644
--- a/src/libs/3rdparty/cplusplus/Keywords.cpp
+++ b/src/libs/3rdparty/cplusplus/Keywords.cpp
@@ -573,6 +573,26 @@ static inline int classify7(const char *s, bool q, bool x) {
}
}
}
+ else if (x && s[0] == 'a') {
+ if (s[1] == 'l') {
+ if (s[2] == 'i') {
+ if (s[3] == 'g') {
+ if (s[4] == 'n') {
+ if (s[5] == 'a') {
+ if (s[6] == 's') {
+ return T_ALIGNAS;
+ }
+ }
+ else if (s[5] == 'o') {
+ if (s[6] == 'f') {
+ return T_ALIGNOF;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
else if (s[0] == 'd') {
if (s[1] == 'e') {
if (s[2] == 'f') {
diff --git a/src/libs/3rdparty/cplusplus/Token.cpp b/src/libs/3rdparty/cplusplus/Token.cpp
index dcc18601c2..ed3319aeab 100644
--- a/src/libs/3rdparty/cplusplus/Token.cpp
+++ b/src/libs/3rdparty/cplusplus/Token.cpp
@@ -46,7 +46,7 @@ static const char *token_names[] = {
("|="), ("||"), ("+"), ("+="), ("++"), ("#"), ("##"), ("?"), ("}"),
("]"), (")"), (";"), ("*"), ("*="), ("~"), ("~="),
- ("asm"), ("auto"), ("bool"), ("break"), ("case"), ("catch"),
+ ("alignas"), ("alignof"), ("asm"), ("auto"), ("bool"), ("break"), ("case"), ("catch"),
("char"), ("char16_t"), ("char32_t"),
("class"), ("const"), ("const_cast"), ("constexpr"), ("continue"),
("decltype"), ("default"),
diff --git a/src/libs/3rdparty/cplusplus/Token.h b/src/libs/3rdparty/cplusplus/Token.h
index a89e552256..3d253151bd 100644
--- a/src/libs/3rdparty/cplusplus/Token.h
+++ b/src/libs/3rdparty/cplusplus/Token.h
@@ -115,7 +115,9 @@ enum Kind {
T_LAST_OPERATOR = T_TILDE_EQUAL,
T_FIRST_KEYWORD,
- T_ASM = T_FIRST_KEYWORD,
+ T_ALIGNAS = T_FIRST_KEYWORD,
+ T_ALIGNOF,
+ T_ASM,
T_AUTO,
T_BOOL,
T_BREAK,