clang/lib/AST/Decl.cpp: Tweak isVLATypeCapturingAllowed() for -Asserts. [-Wunused-function]

llvm-svn: 220853
This commit is contained in:
NAKAMURA Takumi 2014-10-29 13:27:44 +00:00
parent a094f0428b
commit 639728da35
1 changed files with 3 additions and 1 deletions

View File

@ -3330,8 +3330,10 @@ SourceRange FieldDecl::getSourceRange() const {
}
void FieldDecl::setCapturedVLAType(const VariableArrayType *VLAType) {
assert(isVLATypeCapturingAllowed(getParent()) &&
bool fVLATypeCapturingAllowed = isVLATypeCapturingAllowed(getParent());
assert(fVLATypeCapturingAllowed &&
"capturing type in non-lambda or captured record.");
(void)fVLATypeCapturingAllowed;
assert(InitStorage.getInt() == ISK_BitWidthOrNothing &&
InitStorage.getPointer() == nullptr &&
"bit width, initializer or captured type already set");