Author: dsanders Date: Mon Apr 27 03:15:56 2015 New Revision: 235843 URL: http://llvm.org/viewvc/llvm-project?rev=235843&view=rev Log: Merging r233508: ------------------------------------------------------------------------ r233508 | petarj | 2015-03-30 01:43:56 +0100 (Mon, 30 Mar 2015) | 23 lines
Add check for kind of UnqualifiedId in Declarator::isStaticMember() Method CXXMethodDecl::isStaticOverloadedOperator expects Operator field from the struct OperatorFunctionId, which is a member of the union in the class UnqualifiedId. If the kind of UnqualifiedId is not checked, there is no guarantee that the value that this method receives will be correct, because it can be the value of another union member and not OperatorFunctionId. This bug manifests itself when running make check-all on mips64 BE. This fix resolves the following regression tests: Clang :: CXX/special/class.dtor/p9.cpp Clang :: CodeGenCXX/2006-09-12-OpaqueStructCrash.cpp Clang :: CodeGenCXX/ctor-dtor-alias.cpp Clang :: CodeGenCXX/debug-info-windows-dtor.cpp Clang :: CodeGenCXX/dllexport-members.cpp Clang :: CodeGenCXX/dllexport.cpp Patch by Violeta Vukobrat. Differential Revision: http://reviews.llvm.org/D8437 ------------------------------------------------------------------------ Modified: cfe/branches/release_36/ (props changed) cfe/branches/release_36/lib/Sema/DeclSpec.cpp Propchange: cfe/branches/release_36/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Mon Apr 27 03:15:56 2015 @@ -1,4 +1,4 @@ /cfe/branches/type-system-rewrite:134693-134817 -/cfe/trunk:226008,226049,226136,226282,226382,226384,226624,226707,226754,226863,226877,227062,227088,227220,227251,227278,227295,227368,227393,227861,227979,228053,228464,228785,228792,228918,229408,229680,229719,230253,230255,230469,231245,231280,231986,232389,233819,234629,234636 +/cfe/trunk:226008,226049,226136,226282,226382,226384,226624,226707,226754,226863,226877,227062,227088,227220,227251,227278,227295,227368,227393,227861,227979,228053,228464,228785,228792,228918,229408,229680,229719,230253,230255,230469,231245,231280,231986,232389,233508,233819,234629,234636 /cfe/trunk/test:170344 /cfe/trunk/test/SemaTemplate:126920 Modified: cfe/branches/release_36/lib/Sema/DeclSpec.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_36/lib/Sema/DeclSpec.cpp?rev=235843&r1=235842&r2=235843&view=diff ============================================================================== --- cfe/branches/release_36/lib/Sema/DeclSpec.cpp (original) +++ cfe/branches/release_36/lib/Sema/DeclSpec.cpp Mon Apr 27 03:15:56 2015 @@ -345,8 +345,9 @@ bool Declarator::isDeclarationOfFunction bool Declarator::isStaticMember() { assert(getContext() == MemberContext); return getDeclSpec().getStorageClassSpec() == DeclSpec::SCS_static || - CXXMethodDecl::isStaticOverloadedOperator( - getName().OperatorFunctionId.Operator); + (getName().Kind == UnqualifiedId::IK_OperatorFunctionId && + CXXMethodDecl::isStaticOverloadedOperator( + getName().OperatorFunctionId.Operator)); } bool DeclSpec::hasTagDefinition() const { _______________________________________________ llvm-branch-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/llvm-branch-commits
