summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-06-22 20:37:23 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-06-22 20:37:23 +0000
commit18eb69af7938137f5536d8d7cd5ef42d0397d8c5 (patch)
tree9248ccfdd5eb71da837cccff16967f98de1f355a /clang/lib/Sema/SemaExpr.cpp
parentbd9c94d7af46e9ad888a34c631b26ecc50bf64f1 (diff)
downloadbcm5719-llvm-18eb69af7938137f5536d8d7cd5ef42d0397d8c5.tar.gz
bcm5719-llvm-18eb69af7938137f5536d8d7cd5ef42d0397d8c5.zip
Changes made per Doug's comments.
llvm-svn: 73897
Diffstat (limited to 'clang/lib/Sema/SemaExpr.cpp')
-rw-r--r--clang/lib/Sema/SemaExpr.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index e989b1f282f..d0cd23e8592 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -5462,9 +5462,13 @@ void Sema::MarkDeclarationReferenced(SourceLocation Loc, Decl *D) {
// Note that this declaration has been used.
if (CXXConstructorDecl *Constructor = dyn_cast<CXXConstructorDecl>(D)) {
- DefineImplicitDefaultConstructor(Loc, Constructor);
- // FIXME: set the Used flag if it is determined that ctor is valid.
- Constructor->setUsed(true);
+ if (Constructor->isImplicit() && Constructor->isDefaultConstructor()) {
+ if (!Constructor->isUsed())
+ DefineImplicitDefaultConstructor(Loc, Constructor);
+ }
+ // FIXME: more checking for other implicits go here.
+ else
+ Constructor->setUsed(true);
return;
}
OpenPOWER on IntegriCloud