diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-09 21:09:04 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2012-03-09 21:09:04 +0000 |
commit | ba50b3e8bc68bace2f6715111bbbb8510965be01 (patch) | |
tree | 37abb037c0aa9126f7b4fe4f7543d4cf77a15b9e /lib/AST/DeclBase.cpp | |
parent | 8788b224aaa46ccb777e6a24550449dfbb9d195f (diff) |
Allow serializing an invalid ParmVarDecl and don't set access to public for
invalid ParmVarDecls.
Part of rdar://11007039.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152437 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclBase.cpp')
-rw-r--r-- | lib/AST/DeclBase.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 10e612514f..2e192657da 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -69,7 +69,7 @@ const char *Decl::getDeclKindName() const { void Decl::setInvalidDecl(bool Invalid) { InvalidDecl = Invalid; - if (Invalid) { + if (Invalid && !isa<ParmVarDecl>(this)) { // Defensive maneuver for ill-formed code: we're likely not to make it to // a point where we set the access specifier, so default it to "public" // to avoid triggering asserts elsewhere in the front end. |