diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-13 18:04:58 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2012-08-13 18:04:58 +0000 |
| commit | 794ae1ea7766a7ec18d91ecc54b08f84e3a8216a (patch) | |
| tree | 0fe1dfa5c6933f228d8f4b973c5a73c02bea93f4 /clang/lib | |
| parent | 3c7e44191ded8f678fc7769f7b6053d74425876e (diff) | |
| download | bcm5719-llvm-794ae1ea7766a7ec18d91ecc54b08f84e3a8216a.tar.gz bcm5719-llvm-794ae1ea7766a7ec18d91ecc54b08f84e3a8216a.zip | |
c: make __has_attribute(const) work for const
function attribute. // rdar://10253857
llvm-svn: 161767
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Lex/PPMacroExpansion.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Lex/PPMacroExpansion.cpp b/clang/lib/Lex/PPMacroExpansion.cpp index 3a7f02cafbf..7aef2f1a0e4 100644 --- a/clang/lib/Lex/PPMacroExpansion.cpp +++ b/clang/lib/Lex/PPMacroExpansion.cpp @@ -1062,6 +1062,13 @@ 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; |

