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 | 10caec2600089449b58c065d56fc449d095b4536 (patch) | |
tree | 1a4a47c55059f9c897eb5eb9d34074831f6118e7 /lib/Lex/PPMacroExpansion.cpp | |
parent | 265f538b2c8b9e19196ce8a78a3da78671eb6f2b (diff) |
c: small refactoring of checking for __attribute__(const))
per Richard's comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161786 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PPMacroExpansion.cpp')
-rw-r--r-- | lib/Lex/PPMacroExpansion.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/Lex/PPMacroExpansion.cpp b/lib/Lex/PPMacroExpansion.cpp index 7aef2f1a0e..ebdb6446d1 100644 --- a/lib/Lex/PPMacroExpansion.cpp +++ b/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; |