Skip to content
Snippets Groups Projects
Commit 08401a4d authored by Vassil Vassilev's avatar Vassil Vassilev
Browse files

Cling's error recovery has to be able to revert declarations that are declared

multiple times (aka redeclarable declarations). When clang sees redeclaration 
it creates a single-linked list, which head points to the last declaration of 
the list. Consider the example:
typedef int A;
typedef int B;
typedef int C;
extern A i;
extern B i;
extern C i;
int i;

That would create the following redeclaration chain:

 +---+    +---+    +---+    +---+
 | A | <- | B | <- | C | <- | i |
 +---+    +---+    +---+    +---+
   |                          ^
   |                          |
   +--------------------------+

In order to remove the last declaration we need to rebuild the redeclaration chain.

* Rebuild properly the redeclaration chain
* Add tests for that
* Improve the current error recovery infrastructure - this will be changed a lot soon.


git-svn-id: http://root.cern.ch/svn/root/trunk@41851 27541ba8-7e3a-0410-8455-c3a389f83636
parent a488a4f3
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment