From: Mikael Holmen Date: Tue, 21 Aug 2018 07:22:45 +0000 (+0000) Subject: Removed unused variable [NFC] X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e499dd14cc6493f0bd62bc6b95580837fb4303f;p=clang Removed unused variable [NFC] The compiler warned: ../tools/clang/lib/Sema/SemaType.cpp:6788:31: error: unused variable 'AT' [-Werror,-Wunused-variable] if (const AttributedType *AT = S.getCallingConvAttributedType(type)) { ^ 1 error generated. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340251 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index bad6616249..71437f6e2c 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -6785,7 +6785,7 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state, ParsedAttr &attr, if (CCOld != CC) { // Error out on when there's already an attribute on the type // and the CCs don't match. - if (const AttributedType *AT = S.getCallingConvAttributedType(type)) { + if (S.getCallingConvAttributedType(type)) { S.Diag(attr.getLoc(), diag::err_attributes_are_not_compatible) << FunctionType::getNameForCallConv(CC) << FunctionType::getNameForCallConv(CCOld);