aboutsummaryrefslogtreecommitdiff
path: root/lib/Parse/ParseDecl.cpp
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2012-02-28 18:12:11 +0000
committerJames Molloy <james.molloy@arm.com>2012-02-28 18:12:11 +0000
commitfbcf0405b7da1c8606e4223b4f91835643ecd5b4 (patch)
tree94f15f288c984dd3be38734e6c2f1e04c5d53c2d /lib/Parse/ParseDecl.cpp
parentf911242f43ae1b0a85c323631fe817df95c9cbe9 (diff)
Correctly track tags and enum members defined in the prototype of a function, and ensure they are properly scoped.
This fixes code such as: enum e {x, y}; int f(enum {y, x} n) { return 0; } This finally fixes PR5464 and PR5477. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151638 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r--lib/Parse/ParseDecl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp
index 4d93eaf85d..835a652910 100644
--- a/lib/Parse/ParseDecl.cpp
+++ b/lib/Parse/ParseDecl.cpp
@@ -4226,6 +4226,8 @@ void Parser::ParseFunctionDeclarator(Declarator &D,
ExprResult NoexceptExpr;
ParsedType TrailingReturnType;
+ Actions.ActOnStartFunctionDeclarator();
+
SourceLocation EndLoc;
if (isFunctionDeclaratorIdentifierList()) {
if (RequiresArg)