From dd5132ce2569a1ef901c92772eb8581aa1705f25 Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Sat, 6 Mar 2010 09:23:02 +0000 Subject: Update clang to r97873. --- lib/AST/DeclBase.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/AST/DeclBase.cpp') diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp index 47b7e7efb60e0..9db6ae1329e4e 100644 --- a/lib/AST/DeclBase.cpp +++ b/lib/AST/DeclBase.cpp @@ -46,6 +46,16 @@ const char *Decl::getDeclKindName() const { } } +void Decl::setInvalidDecl(bool Invalid) { + InvalidDecl = Invalid; + if (Invalid) { + // 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. + setAccess(AS_public); + } +} + const char *DeclContext::getDeclKindName() const { switch (DeclKind) { default: assert(0 && "Declaration context not in DeclNodes.def!"); -- cgit v1.2.3