From 76d326448d7e4c10b2896edc2ee855d1e68d1b88 Mon Sep 17 00:00:00 2001 From: John McCall Date: Sat, 24 Apr 2010 01:30:58 +0000 Subject: Recommit r102215, this time being more careful to only set the "principal declaration" (i.e. the only which will actually be looked up) to have the non-member-operator bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102231 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/PCHReaderDecl.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/Frontend/PCHReaderDecl.cpp') diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index 45f7e496ba..53647badff 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/lib/Frontend/PCHReaderDecl.cpp @@ -197,6 +197,11 @@ void PCHDeclReader::VisitFunctionDecl(FunctionDecl *FD) { for (unsigned I = 0; I != NumParams; ++I) Params.push_back(cast(Reader.GetDecl(Record[Idx++]))); FD->setParams(Params.data(), NumParams); + + // FIXME: order this properly w.r.t. friendness + // FIXME: this same thing needs to happen for function templates + if (FD->isOverloadedOperator() && !FD->getDeclContext()->isRecord()) + FD->setNonMemberOperator(); } void PCHDeclReader::VisitObjCMethodDecl(ObjCMethodDecl *MD) { -- cgit v1.2.3-70-g09d2