r220853 - clang/lib/AST/Decl.cpp: Tweak isVLATypeCapturingAllowed() for -Asserts. [-Wunused-function]
NAKAMURA Takumi
geek4civic at gmail.com
Wed Oct 29 06:27:44 PDT 2014
Author: chapuni
Date: Wed Oct 29 08:27:44 2014
New Revision: 220853
URL: http://llvm.org/viewvc/llvm-project?rev=220853&view=rev
Log:
clang/lib/AST/Decl.cpp: Tweak isVLATypeCapturingAllowed() for -Asserts. [-Wunused-function]
Modified:
cfe/trunk/lib/AST/Decl.cpp
Modified: cfe/trunk/lib/AST/Decl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Decl.cpp?rev=220853&r1=220852&r2=220853&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Decl.cpp (original)
+++ cfe/trunk/lib/AST/Decl.cpp Wed Oct 29 08:27:44 2014
@@ -3330,8 +3330,10 @@ SourceRange FieldDecl::getSourceRange()
}
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");
More information about the cfe-commits
mailing list