Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 340677

Summary: inconsequent bindings in preprocessor names
Product: [Tools] CDT Reporter: Lukas Felber <l.felber>
Component: cdt-indexerAssignee: Project Inbox <cdt-indexer-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: minor    
Priority: P3 CC: cdtdoug, yevshif
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Lukas Felber CLA 2011-03-22 12:05:32 EDT
Build Identifier: M20100909-0800

considering the preprocessor name (which was not defined) following either #ifdef or #undef, the returned binding is in the first case an UndefinedMacro instance and in the second case null.
Is there a reason for this? for me it would make more sence to have a similar behavior here (either both null or both UndefinedMacro).

Reproducible: Always

Steps to Reproduce:
1. create a source file containing:
#ifdef A //binding of a is UndefinedBinding, name is of type ASTMacroReferenceName
#endif
#undef B //binding is null, name is of type ASTPreprocessorName