r173996 - Fix unused variable warnings in -asserts build
Matt Beaumont-Gay
matthewbg at google.com
Wed Jan 30 16:08:04 PST 2013
Author: matthewbg
Date: Wed Jan 30 18:08:03 2013
New Revision: 173996
URL: http://llvm.org/viewvc/llvm-project?rev=173996&view=rev
Log:
Fix unused variable warnings in -asserts build
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=173996&r1=173995&r2=173996&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Wed Jan 30 18:08:03 2013
@@ -1677,15 +1677,15 @@ Sema::ActOnCXXMemberDeclarator(Scope *S,
unsigned DiagID;
bool Failed = D.getMutableDeclSpec().SetTypeQual(DeclSpec::TQ_const, ConstexprLoc,
PrevSpec, DiagID, getLangOpts());
+ (void)Failed;
assert(!Failed && "Making a constexpr member const shouldn't fail");
} else {
B << 1;
const char *PrevSpec;
unsigned DiagID;
- DeclSpec::SCS PrevSCS = DS.getStorageClassSpec();
if (D.getMutableDeclSpec().SetStorageClassSpec(
*this, DeclSpec::SCS_static, ConstexprLoc, PrevSpec, DiagID)) {
- assert(PrevSCS == DeclSpec::SCS_mutable &&
+ assert(DS.getStorageClassSpec() == DeclSpec::SCS_mutable &&
"This is the only DeclSpec that should fail to be applied");
B << 1;
} else {
More information about the cfe-commits
mailing list