summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/destructor.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-04-25 08:06:05 +0000
committerChris Lattner <sabre@nondot.org>2009-04-25 08:06:05 +0000
commitf6d1c9c7f0147c724cdbdd3dd8f2aecdb8c5d1d5 (patch)
tree00f7dcea9dc199268b38b4c8af41e0902579c86b /clang/test/SemaCXX/destructor.cpp
parent0c155e6dbe44a3ea8dc9a325bc82075bd8eb71bc (diff)
downloadbcm5719-llvm-f6d1c9c7f0147c724cdbdd3dd8f2aecdb8c5d1d5.tar.gz
bcm5719-llvm-f6d1c9c7f0147c724cdbdd3dd8f2aecdb8c5d1d5.zip
This is a pretty big cleanup for how invalid decl/type are handle.
This gets rid of a bunch of random InvalidDecl bools in sema, changing us to use the following approach: 1. When analyzing a declspec or declarator, if an error is found, we set a bit in Declarator saying that it is invalid. 2. Once the Decl is created by sema, we immediately set the isInvalid bit on it from what is in the declarator. From this point on, sema consistently looks at and sets the bit on the decl. This gives a very clear separation of concerns and simplifies a bunch of code. In addition to this, this patch makes these changes: 1. it renames DeclSpec::getInvalidType() -> isInvalidType(). 2. various "merge" functions no longer return bools: they just set the invalid bit on the dest decl if invalid. 3. The ActOnTypedefDeclarator/ActOnFunctionDeclarator/ActOnVariableDeclarator methods now set invalid on the decl returned instead of returning an invalid bit byref. 4. In SemaType, refering to a typedef that was invalid now propagates the bit into the resultant type. Stuff declared with the invalid typedef will now be marked invalid. 5. Various methods like CheckVariableDeclaration now return void and set the invalid bit on the decl they check. There are a few minor changes to tests with this, but the only major bad result is test/SemaCXX/constructor-recovery.cpp. I'll take a look at this next. llvm-svn: 70020
Diffstat (limited to 'clang/test/SemaCXX/destructor.cpp')
-rw-r--r--clang/test/SemaCXX/destructor.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/SemaCXX/destructor.cpp b/clang/test/SemaCXX/destructor.cpp
index 3ba5fd59466..c60045bb59d 100644
--- a/clang/test/SemaCXX/destructor.cpp
+++ b/clang/test/SemaCXX/destructor.cpp
@@ -23,6 +23,7 @@ struct D {
// expected-error{{destructor cannot be variadic}}
};
+
struct E;
typedef E E_typedef;
OpenPOWER on IntegriCloud