diff options
author | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-05 00:05:47 +0000 |
---|---|---|
committer | Sean Hunt <scshunt@csclub.uwaterloo.ca> | 2011-05-05 00:05:47 +0000 |
commit | c1598700010cea9364a58a65e967b0b56361b6aa (patch) | |
tree | 84b34b76ede8fe385130720052715283f926daeb /lib/Sema/SemaDeclCXX.cpp | |
parent | e74c25c5c0375004bd84945bda53c3a96f443da8 (diff) |
Change cycle detection to be based off of a warning flag.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130898 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclCXX.cpp')
-rw-r--r-- | lib/Sema/SemaDeclCXX.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Sema/SemaDeclCXX.cpp b/lib/Sema/SemaDeclCXX.cpp index bb732e2c9f..7b28696814 100644 --- a/lib/Sema/SemaDeclCXX.cpp +++ b/lib/Sema/SemaDeclCXX.cpp @@ -2085,8 +2085,7 @@ Sema::SetDelegatingInitializer(CXXConstructorDecl *Constructor, DiagnoseUseOfDecl(Dtor, Initializer->getSourceLocation()); } - if (LangOpts.CheckDelegatingCtorCycles) - DelegatingCtorDecls.push_back(Constructor); + DelegatingCtorDecls.push_back(Constructor); return false; } @@ -7984,7 +7983,7 @@ void DelegatingCycleHelper(CXXConstructorDecl* Ctor, // If we haven't diagnosed this cycle yet, do so now. if (!Invalid.count(TCanonical)) { S.Diag((*Ctor->init_begin())->getSourceLocation(), - diag::err_delegating_ctor_cycle) + diag::warn_delegating_ctor_cycle) << Ctor; // Don't add a note for a function delegating directo to itself. |