]> granicus.if.org Git - clang/commit
Merging r233508:
authorDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 27 Apr 2015 08:15:56 +0000 (08:15 +0000)
committerDaniel Sanders <daniel.sanders@imgtec.com>
Mon, 27 Apr 2015 08:15:56 +0000 (08:15 +0000)
commitab059c8de069ef9b030edab3fdbbc70b4efdc453
tree0b32ede0b86bcf3b666c63d2b7277dd6ddbb9979
parent289ccdc36a8453d314e031aac5f047e3c9f005e1
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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_36@235843 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Sema/DeclSpec.cpp