mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 11:15:38 +02:00
Bug 321437 - passing a null index as the effect of not skipping any headers. Patch from Marc-Andre Laperle
This commit is contained in:
parent
2d5e046e1c
commit
92009d5090
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ public class QuickFixCreateField extends AbstractAstRewriteQuickFix {
|
||||||
CxxAstUtils utils = CxxAstUtils.getInstance();
|
CxxAstUtils utils = CxxAstUtils.getInstance();
|
||||||
try {
|
try {
|
||||||
IASTTranslationUnit ast = getTranslationUnitViaEditor(marker)
|
IASTTranslationUnit ast = getTranslationUnitViaEditor(marker)
|
||||||
.getAST(null, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
|
.getAST(index, ITranslationUnit.AST_SKIP_INDEXED_HEADERS);
|
||||||
IASTName astName = getASTNameFromMarker(marker, ast);
|
IASTName astName = getASTNameFromMarker(marker, ast);
|
||||||
if (astName == null) {
|
if (astName == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -385,7 +385,7 @@ public final class CxxAstUtils {
|
||||||
for (IIndexName decl : declarations) {
|
for (IIndexName decl : declarations) {
|
||||||
|
|
||||||
ITranslationUnit tu = getTranslationUnitFromIndexName(decl);
|
ITranslationUnit tu = getTranslationUnitFromIndexName(decl);
|
||||||
IASTNode node = tu.getAST(null,
|
IASTNode node = tu.getAST(index,
|
||||||
ITranslationUnit.AST_SKIP_INDEXED_HEADERS)
|
ITranslationUnit.AST_SKIP_INDEXED_HEADERS)
|
||||||
.getNodeSelector(null).findEnclosingNode(
|
.getNodeSelector(null).findEnclosingNode(
|
||||||
decl.getNodeOffset(),
|
decl.getNodeOffset(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue