Comments (3)
I've experimented with some success with breaking the post-processing into two phases, where the functions/macros/types/variables tables built from a first scan of the csv files, and the _decldef tables built from a second scan of the csv files, and omitting the update_decldef step. We'd need to do something similar for the _refs tables, but first we'd need to teach the clang plugin to output the qualname for 'ref' csv rows.
from dxr.
Relying on the qualname being unique might not be such a good idea right
now. For one thing, static global variables are going to cause
collisions. Think of having "static int foo;" in two different translation
units. This could be solved by mangling the qualname for such variables,
perhaps by appending "::" to them or something along
those lines.
There's also the case where you're building multiple binaries and each one
contains "extern int foo = 0;" in separate files. These are separate
variables but they share the same qualname. Unless we add support for
grabbing information from the link phase it would be pretty hard to
distinguish these by qualname alone.
There's also the possibility of local variables that are shadowed:
void foo()
{
int bar; // qualname is foo()::bar
{
int bar; // qualname is also foo()::bar ?
}
}
I think we may want to add qualname to the existing unique key but I seem
to recall that I ran into issues when trying that. When you have
templates, the name you get back depends on whether the template had been
instantiated or not. So you'd get Foo for the definition and then
Foo or Foo or something for the reference. Since these don't
match you'd end up with a lot of places where you couldn't find the entity
that was referenced. You'd have to find a way to get Foo from these
references. But you also have to watch out for the case where there is an
explicit specialization for Foo since in that case you do want to
stay with Foo and not have Foo. Templates are complicated.
On Fri, Mar 14, 2014 at 8:26 PM, docfaraday [email protected]:
I've experimented with some success with breaking the post-processing into
two phases, where the functions/macros/types/variables tables built from a
first scan of the csv files, and the _decldef tables built from a second
scan of the csv files, and omitting the update_decldef step. We'd need to
do something similar for the _refs tables, but first we'd need to teach the
clang plugin to output the qualname for 'ref' csv rows.Reply to this email directly or view it on GitHubhttps://github.com//issues/257#issuecomment-37709944
.
from dxr.
I wonder if the scope information that DXR records could be useful here.
from dxr.
Related Issues (20)
- Advance searching in folder does not work HOT 1
- Cannot access https://dxr.mozilla.org/mozilla-central/source/devtools/client/debugger/new/debugger.js HOT 3
- How to pass multiple arguments to clang plugin ? HOT 1
- DXR fails to index files tracked by git when www_root is set
- Add robots.txt
- Suggestion: Publish to public docker hub
- Upgrade the clang plugin to clang 7 API HOT 1
- Wiki changes
- Support for distributing indexing tasks on a cluster of machines HOT 1
- Question: atomicity/consistency of incremental indexing HOT 1
- How to create a separate index for each git commit and allow browsing code as of old commits HOT 3
- "python setup.py install" results in "error: click 4.1 is installed but click>=5.1 is required by set(['Flask'])" HOT 4
- CODE_OF_CONDUCT.md file missing
- Installation fails due to conflicting click version HOT 2
- Search input isn't detected by Firefox One-Click Search Engines HOT 1
- missed keys set(['python', 'buglink', 'xpidl']) HOT 2
- Basic beginner 'getting started' broken HOT 3
- Travis CI free usage ends Dec 3; mozilla repos should switch to other CI platforms
- Suggestion: Dark mode
- Python3 support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxr.