From owner-freebsd-current@FreeBSD.ORG Mon Dec 17 12:40:54 2012 Return-Path: Delivered-To: Current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5773483; Mon, 17 Dec 2012 12:40:54 +0000 (UTC) (envelope-from sfourman@gmail.com) Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2A28FC12; Mon, 17 Dec 2012 12:40:53 +0000 (UTC) Received: by mail-ee0-f54.google.com with SMTP id c13so3159604eek.13 for ; Mon, 17 Dec 2012 04:40:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ETyYbx6+PYovWyGjZ6rJp5WONAfBwEVD952KR3C4xfw=; b=X8J3d0Iit17SkiA5gnA94DP8pknFLsYymyUfIizn/k1x2/n8kLg2N/FthJrSEnyeuY zrLJ+DcQFctxEjea3V0IXYPKlSWCT6Gqcr+FVAqiGzjrJwq1y9Os/DILkxVPbieiM6LU 8U8DrqvKBTFXuoqvZIrNZioNdNix4gtRsNGHaXlOgEUGoWAX2wKJP0HPwUpRo1tBKtws RyzkUK/Vfy1OsXjHpwNaUNkE6voI9yUft3ek64q6zF05x2nrU2IENOoODIas2/D1LvDq P1EG8VMCEUVUWR3Dn4bwt3m0exNKDyxyp5VhsmsHnzkAaHON0xa3j1nuecf01x+n/WMV u2HA== MIME-Version: 1.0 Received: by 10.14.209.193 with SMTP id s41mr41304670eeo.9.1355748052980; Mon, 17 Dec 2012 04:40:52 -0800 (PST) Received: by 10.14.4.68 with HTTP; Mon, 17 Dec 2012 04:40:52 -0800 (PST) In-Reply-To: <50CF0715.7060300@FreeBSD.org> References: <50CE2E29.4030906@FreeBSD.org> <50CF0715.7060300@FreeBSD.org> Date: Mon, 17 Dec 2012 07:40:52 -0500 Message-ID: Subject: Re: Clang/LLVM revision 169451 From: "Sam Fourman Jr." To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 Cc: FreeBSD Current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2012 12:40:54 -0000 On Mon, Dec 17, 2012 at 6:50 AM, Dimitry Andric wrote: > On 2012-12-17 09:36, Sam Fourman Jr. wrote: >>> >>> No, there is no one-click merge script, it needs humanoid help, I'm >>> afraid. :-) Is there any reason you cannot just install the port, or >>> if that is too outdated, just checkout from llvm.org directly and build >>> it? >> >> >> is it currently possible to build FreeBSD world, without clang and >> then build clang from ports? > > > There is no real need, as you can just put /usr/local/bin before > /usr/bin in your PATH, but if you really want to do so, you can put the > following in /etc/src.conf: > > CC=gcc > CXX=g++ > CPP=gcpp > WITHOUT_CLANG= > > From then on, you build world with gcc, which will also be installed as > /usr/bin/cc again. I ended up generating and applying this patch, and rebuilt world again root@www:/root # cat clang-169451.patch Index: contrib/llvm/tools/clang/include/clang/Sema/Scope.h =================================================================== --- contrib/llvm/tools/clang/include/clang/Sema/Scope.h (revision 244350) +++ contrib/llvm/tools/clang/include/clang/Sema/Scope.h (working copy) @@ -84,11 +84,18 @@ /// TryScope - This is the scope of a C++ try statement. TryScope = 0x1000, + /// CatchScope - This is the scope of a C++ catch statement. + CatchScope = 0x2000, + + /// FnTryCatchScope - This is the scope for a function-level C++ try or + /// catch scope. + FnTryCatchScope = 0x4000, + /// FnTryScope - This is the scope of a function-level C++ try scope. - FnTryScope = 0x3000, + FnTryScope = TryScope | FnTryCatchScope, /// FnCatchScope - This is the scope of a function-level C++ catch scope. - FnCatchScope = 0x4000 + FnCatchScope = CatchScope | FnTryCatchScope }; private: /// The parent scope for this scope. This is null for the translation-unit Index: contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp =================================================================== --- contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp (revision 244350) +++ contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp (working copy) @@ -2197,7 +2197,7 @@ // The name in a catch exception-declaration is local to the handler and // shall not be redeclared in the outermost block of the handler. ParseScope CatchScope(this, Scope::DeclScope | Scope::ControlScope | - (FnCatch ? Scope::FnCatchScope : 0)); + (FnCatch ? Scope::FnCatchScope : Scope::CatchScope)); // exception-declaration is equivalent to '...' or a parameter-declaration // without default arguments. Index: contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp =================================================================== --- contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp (revision 244350) +++ contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp (working copy) @@ -135,16 +135,13 @@ // of the controlled statement. // assert(S->getParent() && "No TUScope?"); - if (S->getFlags() & Scope::FnTryScope) - return S->getParent()->isDeclScope(D); if (S->getParent()->getFlags() & Scope::ControlScope) { - if (S->getParent()->getFlags() & Scope::FnCatchScope) { - S = S->getParent(); - if (S->isDeclScope(D)) - return true; - } + S = S->getParent(); + if (S->isDeclScope(D)) + return true; + } + if (S->getFlags() & Scope::FnTryCatchScope) return S->getParent()->isDeclScope(D); - } } return false; }