diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-10-25 03:44:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-10-25 03:44:56 +0000 |
commit | 65019acfc46ffb191fac4e781ac0c4b8d0c8434e (patch) | |
tree | 7162170291c99c1201ad447a852873a489a146ce /lib/Parse/Parser.cpp | |
parent | 42edac0092749eff3ba881d1b9a425b4f1c9c049 (diff) |
Check for unexpanded parameter packs in the name that guards a
Microsoft __if_exists/__if_not_exists statement. Also note that we
weren't traversing DeclarationNameInfo *at all* within the
RecursiveASTVisitor, which would be rather fatal for variadic
templates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142906 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/Parser.cpp')
-rw-r--r-- | lib/Parse/Parser.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 90bed04e75..fabb8e2a59 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -1503,7 +1503,8 @@ bool Parser::ParseMicrosoftIfExistsCondition(IfExistsCondition& Result) { return true; // Check if the symbol exists. - switch (Actions.CheckMicrosoftIfExistsSymbol(getCurScope(), Result.SS, + switch (Actions.CheckMicrosoftIfExistsSymbol(getCurScope(), Result.KeywordLoc, + Result.IsIfExists, Result.SS, Result.Name)) { case Sema::IER_Exists: Result.Behavior = Result.IsIfExists ? IEB_Parse : IEB_Skip; @@ -1516,6 +1517,9 @@ bool Parser::ParseMicrosoftIfExistsCondition(IfExistsCondition& Result) { case Sema::IER_Dependent: Result.Behavior = IEB_Dependent; break; + + case Sema::IER_Error: + return true; } return false; |