<p dir="ltr">On 25 Apr 2015 4:10 am, "Daniel Sanders" <<a href="mailto:Daniel.Sanders@imgtec.com">Daniel.Sanders@imgtec.com</a>> wrote:<br>
><br>
> Hi Richard,<br>
><br>
> I'd like to merge this patch into the LLVM 3.6.1 release. Is this merge ok with you?</p>
<p dir="ltr">Yes, approved.</p>
<p dir="ltr"> ________________________________________<br>
> From: <a href="mailto:cfe-commits-bounces@cs.uiuc.edu">cfe-commits-bounces@cs.uiuc.edu</a> [<a href="mailto:cfe-commits-bounces@cs.uiuc.edu">cfe-commits-bounces@cs.uiuc.edu</a>] on behalf of Petar Jovanovic<br>
> Sent: 30 March 2015 01:43<br>
> To: <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> Subject: r233508 - Add check for kind of UnqualifiedId in Declarator::isStaticMember()<br>
><br>
> Author: petarj<br>
> Date: Sun Mar 29 19:43:56 2015<br>
> New Revision: 233508<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=233508&view=rev">http://llvm.org/viewvc/llvm-project?rev=233508&view=rev</a><br>
> Log:<br>
> Add check for kind of UnqualifiedId in Declarator::isStaticMember()<br>
><br>
> Method CXXMethodDecl::isStaticOverloadedOperator expects Operator field<br>
> from the struct OperatorFunctionId, which is a member of the union in<br>
> the class UnqualifiedId. If the kind of UnqualifiedId is not checked,<br>
> there is no guarantee that the value that this method receives will be<br>
> correct, because it can be the value of another union member and not<br>
> OperatorFunctionId.<br>
><br>
> This bug manifests itself when running make check-all on mips64 BE.<br>
><br>
> This fix resolves the following regression tests:<br>
> Clang :: CXX/special/class.dtor/p9.cpp<br>
> Clang :: CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp<br>
> Clang :: CodeGenCXX/ctor-dtor-alias.cpp<br>
> Clang :: CodeGenCXX/debug-info-windows-dtor.cpp<br>
> Clang :: CodeGenCXX/dllexport-members.cpp<br>
> Clang :: CodeGenCXX/dllexport.cpp<br>
><br>
> Patch by Violeta Vukobrat.<br>
><br>
> Differential Revision: <a href="http://reviews.llvm.org/D8437">http://reviews.llvm.org/D8437</a><br>
><br>
> Modified:<br>
> cfe/trunk/lib/Sema/DeclSpec.cpp<br>
><br>
> Modified: cfe/trunk/lib/Sema/DeclSpec.cpp<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DeclSpec.cpp?rev=233508&r1=233507&r2=233508&view=diff">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/DeclSpec.cpp?rev=233508&r1=233507&r2=233508&view=diff</a><br>
> ==============================================================================<br>
> --- cfe/trunk/lib/Sema/DeclSpec.cpp (original)<br>
> +++ cfe/trunk/lib/Sema/DeclSpec.cpp Sun Mar 29 19:43:56 2015<br>
> @@ -345,8 +345,9 @@ bool Declarator::isDeclarationOfFunction<br>
> bool Declarator::isStaticMember() {<br>
> assert(getContext() == MemberContext);<br>
> return getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static ||<br>
> - CXXMethodDecl::isStaticOverloadedOperator(<br>
> - getName().OperatorFunctionId.Operator);<br>
> + (getName().Kind == UnqualifiedId::IK_OperatorFunctionId &&<br>
> + CXXMethodDecl::isStaticOverloadedOperator(<br>
> + getName().OperatorFunctionId.Operator));<br>
> }<br>
><br>
> bool DeclSpec::hasTagDefinition() const {<br>
><br>
><br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
</p>