[PATCH] D42915: [clangd] Use URIs in index symbols.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 6 02:48:26 PST 2018
hokein added inline comments.
================
Comment at: clangd/index/Index.h:27
+ // The URI of the source file where a symbol occurs.
+ llvm::StringRef FileUri;
// The 0-based offset to the first character of the symbol from the beginning
----------------
sammccall wrote:
> ioeric wrote:
> > sammccall wrote:
> > > nit: FileURI?
> > > (The other style is OK too, though I personally find it harder to read. But the class is `URI` and we should be consistent)
> > I tend to use `Uri` for URI strings and `URI`/`U` for URI objects. But I'd be okay with either, if you prefer `URI`.
> I'm fine with either spelling, but not really with mixing the two.
>
> Is there some precedent for using different capitalization depending on the variable type? That seems... non obvious to me.
I'm +1 on `URI`, using all capital letters for initialisms can make the name a bit easier to read. Let's be consistent using `URI`?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D42915
More information about the cfe-commits
mailing list