[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/last-cedet-merge e4e864a 39/50: semantic: Properly
From: |
David Engster |
Subject: |
[Emacs-diffs] scratch/last-cedet-merge e4e864a 39/50: semantic: Properly create canonical name for C++ type tag |
Date: |
Wed, 25 Jan 2017 22:15:23 +0000 (UTC) |
branch: scratch/last-cedet-merge
commit e4e864a0d64c3d7dfbfe54e74d0ebdfd4384e76a
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>
semantic: Properly create canonical name for C++ type tag
* lisp/cedet/semantic/bovine/c.el
(semantic-format-tag-canonical-name): Add part for a type with
:parent. Merge parent names together.
(semantic-c-dereference-typedef): If type is tag, use canonical name.
---
lisp/cedet/semantic/bovine/c.el | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/lisp/cedet/semantic/bovine/c.el b/lisp/cedet/semantic/bovine/c.el
index a72b0dd..8739f8d 100644
--- a/lisp/cedet/semantic/bovine/c.el
+++ b/lisp/cedet/semantic/bovine/c.el
@@ -1422,8 +1422,18 @@ PARENT specifies a parent class.
COLOR indicates that the text should be type colorized.
Enhances the base class to search for the entire parent
tree to make the name accurate."
- (semantic-format-tag-canonical-name-default tag parent color)
- )
+ (cond
+ ((and (semantic-tag-of-class-p tag 'type)
+ (semantic-tag-get-attribute tag :parent))
+ ;; We nee to combine the :parent into the tag name and continue on.
+ (let* ((par (semantic-tag-get-attribute tag :parent))
+ (parstr (if (stringp par) par
+ (mapconcat 'identity par "::")))
+ (clone (semantic-tag-clone
+ tag (concat parstr "::" (semantic-tag-name tag)))))
+ (semantic-format-tag-canonical-name-default clone parent color)))
+ (t (semantic-format-tag-canonical-name-default tag parent color))
+ ))
(define-mode-local-override semantic-format-tag-type c-mode (tag color)
"Convert the data type of TAG to a string usable in tag formatting.
@@ -1653,6 +1663,8 @@ SCOPE is not used, and TYPE-DECLARATION is used only if
TYPE is not a typedef."
(let* ((fname (semantic-tag-file-name type))
(def (semantic-tag-copy dt nil fname)))
(list def def)))
+ ((semantic-tag-p dt)
+ (list (semantic-format-tag-canonical-name dt) dt))
((stringp dt) (list dt (semantic-tag dt 'type)))
((consp dt) (list (car dt) dt))))
- [Emacs-diffs] scratch/last-cedet-merge 02644fe 36/50: semantic: Add missing save-excursion for scope calculation, (continued)
- [Emacs-diffs] scratch/last-cedet-merge 02644fe 36/50: semantic: Add missing save-excursion for scope calculation, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 50139fb 45/50: semantic: Fix scope calculation for 'enum', David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 03bb495 44/50: semantic: Fix for Python lexer, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 3cbb968 47/50: semantic: Use file name for grammar name instead of %package token, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 6d6b045 27/50: EDE: Improve Emacs project type, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 64484cf 43/50: semantic: Set `semantic-type-relation-separator-character' for Emacs Lisp, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge e698dc1 04/50: semantic: Add support for typedef references, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 783fb86 46/50: semantic: Add 'fromfile' option to grammar package, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge d2a57bd 50/50: CEDET: Fix "unknown slot [...]" warnings, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge f11e08f 10/50: semantic: Fix wisent parser recursion, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge e4e864a 39/50: semantic: Properly create canonical name for C++ type tag,
David Engster <=
- [Emacs-diffs] scratch/last-cedet-merge 8571383 16/50: semantic: Incorporate local scope when finding type, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge ec4505d 17/50: semantic: Accept FLAGS in texinfo-mode for analyzing completions, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 0a2b38b 26/50: EDE: Expand file name, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 2b42323 35/50: EDE: Fix for project detection, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge cfd7139 28/50: semantic: Some C grammar optimizations, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 278c06c 31/50: semantic: Optimize 'typeformbase' in C grammar, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 8daca76 30/50: semantic: C grammar optimizations, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 74263b1 37/50: semantic: Change unary expression rule, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge cfc56f5 38/50: semantic: Fix for db-global, David Engster, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge ebc8418 40/50: semantic: Check if slot is bound, David Engster, 2017/01/25