Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Indexer: Variables defined inside anonymous namespace are not visible for indexer
Indexer: Variables defined inside anonymous namespace are not visible for indexer [message #1424646] Tue, 16 September 2014 08:15 Go to next message
Konrad Zagorski is currently offline Konrad ZagorskiFriend
Messages: 2
Registered: September 2014
Junior Member
Hi,

I'm using Eclipse Luna for quite a large c++ project.
Unfortunately I am encountering an issue with indexer - I found that symbols that are defined inside an anonymous namespace are not "visible" in the same file for indexer.
As a result whole file is red from fake errors, what is a bit irritating.
I searched the web for any info, but all I found was a very old bug, in which someone had similar issue.

Here's a small example:

// in the top of some .c file

namespace
{
    NS1::NS2::LogCat logCategory = NS1::NS2::makeLogCategory( "CategoryName" );
}

void some_function()
{
   LOG_MACRO(logCategory) << "log message";
}




- variable logCategory defined in an anonymous namespace,
- used in function inside a file,
- compilation's fine,
- indexer shouts that logCategory is not a correct symbol,
- everything works fine, when I declare the symbol outside of the anonymous namespace.


Is there a way to make indexer work correctly with variables declared inside an anonymous namespace?

Many thanks in advance,
Konrad
Re: Indexer: Variables defined inside anonymous namespace are not visible for indexer [message #1426843 is a reply to message #1424646] Fri, 19 September 2014 09:41 Go to previous messageGo to next message
Konrad Zagorski is currently offline Konrad ZagorskiFriend
Messages: 2
Registered: September 2014
Junior Member
No clue at all? Smile
Do you think it's enough to report a bug? Does it even allowed for people outside of Eclipse production team?

Best regards,
Konrad
Re: Indexer: Variables defined inside anonymous namespace are not visible for indexer [message #1427011 is a reply to message #1426843] Fri, 19 September 2014 15:08 Go to previous message
Klaus km is currently offline Klaus kmFriend
Messages: 142
Registered: November 2011
Senior Member
Hm, this bug sounds similar?

https://bugs.eclipse.org/bugs/show_bug.cgi?id=392166

Yes, you can add bugzilla entry's, but before you add a new bug check whether this error is already known...

And please post the number of the bug here if you fill out a new one or find an existing one. Thanks.


regards,
Klaus


[Updated on: Fri, 19 September 2014 15:10]

Report message to a moderator

Previous Topic:Now able to Install c, c++ cdt in eclipse
Next Topic:Project Explorer Refresh from Makefile
Goto Forum:
  


Current Time: Mon Sep 23 12:01:40 GMT 2024

Powered by FUDForum. Page generated in 0.03053 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top