diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-13 21:15:02 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-13 21:15:02 +0000 |
| commit | 7513fa346cd7d657ccf8b5a4714527b74f8b9be7 (patch) | |
| tree | a2f758f2a3e8ff0913ccebf730185158aa548bb1 /clang/lib | |
| parent | 209bd65ea492d5ae713339314a52d9ae7421102d (diff) | |
| download | bcm5719-llvm-7513fa346cd7d657ccf8b5a4714527b74f8b9be7.tar.gz bcm5719-llvm-7513fa346cd7d657ccf8b5a4714527b74f8b9be7.zip | |
c: small refactoring of checking for __attribute__(const))
per Richard's comment.
llvm-svn: 161786
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 7aef2f1a0e4..ebdb6446d16 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -1054,7 +1054,7 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { if (Tok.is(tok::l_paren)) { // Read the identifier Lex(Tok); - if (Tok.is(tok::identifier)) { + if (Tok.is(tok::identifier) || Tok.is(tok::kw_const)) { FeatureII = Tok.getIdentifierInfo(); // Read the ')'. @@ -1062,13 +1062,6 @@ void Preprocessor::ExpandBuiltinMacro(Token &Tok) { if (Tok.is(tok::r_paren)) IsValid = true; } - else if (Tok.is(tok::kw_const)) { - FeatureII = getIdentifierInfo("const"); - // Read the ')'. - Lex(Tok); - if (Tok.is(tok::r_paren)) - IsValid = true; - } } bool Value = false; |

