forked from qt-creator/qt-creator
C++ Disable bool keywords in C files
The keywords bool, true, and false don't exist in C90.
When using C99 and stdbool.h, they are defined as macros.
Amends commit 7b2c09a118
Change-Id: I2f2391dd11be841d7d7b249db0b4add8523e53a5
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
5d97c4871a
commit
0d1fef41f7
6
src/libs/3rdparty/cplusplus/Keywords.cpp
vendored
6
src/libs/3rdparty/cplusplus/Keywords.cpp
vendored
@@ -99,7 +99,7 @@ static inline int classify4(const char *s, LanguageFeatures features)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (s[0] == 'b') {
|
||||
else if (features.cxxEnabled && s[0] == 'b') {
|
||||
if (s[1] == 'o') {
|
||||
if (s[2] == 'o') {
|
||||
if (s[3] == 'l') {
|
||||
@@ -173,7 +173,7 @@ static inline int classify4(const char *s, LanguageFeatures features)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (s[1] == 'r') {
|
||||
else if (features.cxxEnabled && s[1] == 'r') {
|
||||
if (s[2] == 'u') {
|
||||
if (s[3] == 'e') {
|
||||
return T_TRUE;
|
||||
@@ -255,7 +255,7 @@ static inline int classify5(const char *s, LanguageFeatures features)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (s[0] == 'f') {
|
||||
else if (features.cxxEnabled && s[0] == 'f') {
|
||||
if (s[1] == 'a') {
|
||||
if (s[2] == 'l') {
|
||||
if (s[3] == 's') {
|
||||
|
||||
Reference in New Issue
Block a user