Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326768 - Macro name is reported as unresolved symbol, not the actual symbol after macro expansion
Summary: Macro name is reported as unresolved symbol, not the actual symbol after macr...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-codan (show other bugs)
Version: 7.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Elena Laskavaia CLA
QA Contact: Elena Laskavaia CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-01 07:43 EDT by Jens Elmenthaler CLA
Modified: 2011-02-23 22:23 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Elmenthaler CLA 2010-10-01 07:43:45 EDT
Build Identifier: HEAD

Consider the following code example:

#include <iostream>
//using namespace ::std;

#define ENTER() cout << "Entering" << endl;

void testSomething()
{
  ENTER();
}

As long as the using directive is commented out, the code will not compile. Codan marks it correctly as an error, but it says "Symbol 'ENTER()' could not be resolved", instead of referring to cout and/or endl.

Reproducible: Always
Comment 1 Elena Laskavaia CLA 2011-02-23 22:15:46 EST
fixed
Comment 2 CDT Genie CLA 2011-02-23 22:23:28 EST
*** cdt cvs genie on behalf of elaskavaia ***
Bug 326768 - Macro name is reported as unresolved symbol, not the actual symbol after macro expansion

[*] ProblemBindingChecker.java 1.6 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/codan/org.eclipse.cdt.codan.checkers/src/org/eclipse/cdt/codan/internal/checkers/ProblemBindingChecker.java?root=Tools_Project&r1=1.5&r2=1.6