[llvm-dev] RFC: Constructing StringRefs at compile time

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Mon Dec 12 15:45:20 PST 2016


On Mon, Dec 12, 2016 at 1:03 PM Zachary Turner via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Well, apparently clang has clang::StringLiteral in clang/AST/Expr.h
>
> So, our options are either: Allow this name clash (obviously the
> namespaces don't clash, only the names) and deal with it when it's an issue
> (which will be limited to clang, and even then not very often), or choose a
> different name.
>

Pretty sure this sort of thing is the reason that Clang doesn't use
namespace llvm, but only select names.

Given the narrow intended use of this type, I don't think a name collision
like this is a big deal. I'd just stick with it & either qualify in the
cases (if any) we need to in Clang, or scope a using decl to just what's
needed, etc.


>
> Thoughts?
>
> On Mon, Dec 12, 2016 at 11:53 AM Zachary Turner <zturner at google.com>
> wrote:
>
> I can. I'll whip something up today
> On Fri, Dec 9, 2016 at 1:18 AM Malcolm Parsons <malcolm.parsons at gmail.com>
> wrote:
>
> On 2 December 2016 at 17:12, James Y Knight <jyknight at google.com> wrote:
> > +1 from me for the StringLiteral proposal from a few messages back.
>
> Zachary, do you want to commit StringLiteral?
>
> --
> Malcolm Parsons
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161212/1b8f162e/attachment.html>


More information about the llvm-dev mailing list