r325716 - Replace incorrect usage of isInvalidDecl with intended setInvalidDecl
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 12:29:05 PST 2018
Author: erichkeane
Date: Wed Feb 21 12:29:05 2018
New Revision: 325716
URL: http://llvm.org/viewvc/llvm-project?rev=325716&view=rev
Log:
Replace incorrect usage of isInvalidDecl with intended setInvalidDecl
This typo would cause an attempt to multiversion 'main' to issue an
error, but not mark the function as invalid. This patch fixes it.
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=325716&r1=325715&r2=325716&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Wed Feb 21 12:29:05 2018
@@ -9324,7 +9324,7 @@ static bool CheckMultiVersionFunction(Se
if (NewFD->isMain()) {
if (NewTA && NewTA->isDefaultVersion()) {
S.Diag(NewFD->getLocation(), diag::err_multiversion_not_allowed_on_main);
- NewFD->isInvalidDecl();
+ NewFD->setInvalidDecl();
return true;
}
return false;
More information about the cfe-commits
mailing list