]> granicus.if.org Git - clang/commit
Fix treatment of types defined in function prototype
authorSerge Pavlov <sepavloff@gmail.com>
Wed, 25 Jun 2014 17:09:41 +0000 (17:09 +0000)
committerSerge Pavlov <sepavloff@gmail.com>
Wed, 25 Jun 2014 17:09:41 +0000 (17:09 +0000)
commit525f68c5da062214c9bca4d85b9febf8d8ebef5b
tree7fc0531c1115848f1c980bd2a7773df895e2a921
parentee276c176ee1e682a793c8b6da4ca5895622ac00
Fix treatment of types defined in function prototype

Types defined in function prototype are diagnosed earlier in C++ compilation.
They are put into declaration context where the prototype is introduced. Later on,
when FunctionDecl object is created, these types are moved into the function context.

This patch fixes PR19018 and PR18963.

Differential Revision: http://reviews.llvm.org/D4145

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@211718 91177308-0d34-0410-b5e6-96231b3b80d8
lib/AST/Decl.cpp
lib/Sema/SemaDecl.cpp
test/Sema/decl-in-prototype.c
test/SemaCXX/type-definition-in-specifier.cpp