aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-02-28 06:22:14 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-02-28 06:22:14 +0000
commit709fa15defbc0208b33707b3da3a628df5a9b7b9 (patch)
tree8e445fb017ec3dafd5c726f7d5f0295a69aa7026 /lib/Sema/SemaDecl.cpp
parent8f17b66c8d383d458e04cada4c9e2452139b0b39 (diff)
Check a few more kinds of declarations that make a scope.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 8a4ffaf65d..e99be90963 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2503,6 +2503,9 @@ static bool StatementCreatesScope(Stmt* S) {
i != DS->decl_end(); ++i) {
if (VarDecl* D = dyn_cast<VarDecl>(*i)) {
result |= D->getType()->isVariablyModifiedType();
+ result |= !!D->getAttr<CleanupAttr>();
+ } else if (TypedefDecl* D = dyn_cast<TypedefDecl>(*i)) {
+ result |= D->getUnderlyingType()->isVariablyModifiedType();
}
}
}