forked from qt-creator/qt-creator
C++: Recognize C++11 nullptr
Change-Id: I5b7ac8f9b2137ffe9439ada4ec4aeb9cee8e249d Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
This commit is contained in:
17
src/libs/3rdparty/cplusplus/Keywords.cpp
vendored
17
src/libs/3rdparty/cplusplus/Keywords.cpp
vendored
@@ -530,7 +530,7 @@ static inline int classify6(const char *s, bool q, bool) {
|
||||
return T_IDENTIFIER;
|
||||
}
|
||||
|
||||
static inline int classify7(const char *s, bool q, bool) {
|
||||
static inline int classify7(const char *s, bool q, bool x) {
|
||||
if (s[0] == '_') {
|
||||
if (s[1] == '_') {
|
||||
if (s[2] == 'a') {
|
||||
@@ -587,6 +587,21 @@ static inline int classify7(const char *s, bool q, bool) {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (x && s[0] == 'n') {
|
||||
if (s[1] == 'u') {
|
||||
if (s[2] == 'l') {
|
||||
if (s[3] == 'l') {
|
||||
if (s[4] == 'p') {
|
||||
if (s[5] == 't') {
|
||||
if (s[6] == 'r') {
|
||||
return T_NULLPTR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (s[0] == 'p') {
|
||||
if (s[1] == 'r') {
|
||||
if (s[2] == 'i') {
|
||||
|
||||
Reference in New Issue
Block a user