[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/last-cedet-merge 8571383 16/50: semantic: Incorpor
From: |
David Engster |
Subject: |
[Emacs-diffs] scratch/last-cedet-merge 8571383 16/50: semantic: Incorporate local scope when finding type |
Date: |
Wed, 25 Jan 2017 22:15:21 +0000 (UTC) |
branch: scratch/last-cedet-merge
commit 85713839e192ed03ba028c760688ae23b134cd5c
Author: Eric Ludlam <address@hidden>
Commit: David Engster <address@hidden>
semantic: Incorporate local scope when finding type
* lisp/cedet/semantic/analyze/fcn.el (semantic-analyze-tag-type): When
first search fails, calc scope from the originating tag, and try
again.
---
lisp/cedet/semantic/analyze/fcn.el | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lisp/cedet/semantic/analyze/fcn.el
b/lisp/cedet/semantic/analyze/fcn.el
index 1abbca5..24f71bb 100644
--- a/lisp/cedet/semantic/analyze/fcn.el
+++ b/lisp/cedet/semantic/analyze/fcn.el
@@ -183,7 +183,16 @@ Optional SCOPE represents a calculated scope in which the
types might be found. This can be nil.
If NOMETADEREF, then do not dereference metatypes. This is
used by the analyzer debugger."
- (semantic-analyze-type (semantic-tag-type tag) scope nometaderef))
+ (or
+ (semantic-analyze-type (semantic-tag-type tag) scope nometaderef)
+ ;; If we didn't find it the 'quick' way with the passed in scope,
+ ;; perhaps the type is using a shorthand only available from the
+ ;; location of TAG, which might be a member of some struct far away
+ ;; from the original source that spawned the search.
+ (let ((tagscope (semantic-calculate-scope-for-tag tag)))
+ (when tagscope
+ (semantic-analyze-type (semantic-tag-type tag)
+ tagscope nometaderef)))))
(defun semantic-analyze-type (type-declaration &optional scope nometaderef)
"Return the semantic tag for TYPE-DECLARATION.
- [Emacs-diffs] scratch/last-cedet-merge 50139fb 45/50: semantic: Fix scope calculation for 'enum', (continued)
- [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, 2017/01/25
- [Emacs-diffs] scratch/last-cedet-merge 8571383 16/50: semantic: Incorporate local scope when finding type,
David Engster <=
- [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
- [Emacs-diffs] scratch/last-cedet-merge b4bcc84 32/50: semantic: completion fixes, David Engster, 2017/01/25