diff --git a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java index 381c576ce28..0de181061c8 100644 --- a/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java +++ b/core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2Tests.java @@ -5421,6 +5421,18 @@ public class AST2Tests extends AST2TestBase { } } + // using MyType = __declspec(dllexport) int; + // + // template + // class Vector { + // }; + // void test() { + // Vector <__declspec(dllexport) int> a; + // } + public void testDeclspecTypeId_574578() throws Exception { + parseAndCheckBindings(getAboveComment(), CPP, true); + } + // struct Outer { // struct {int a1;}; // struct {int a2;} a3; diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java index 9698bfac8e5..58e28e2f276 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/AbstractGNUSourceCodeParser.java @@ -2816,6 +2816,9 @@ public abstract class AbstractGNUSourceCodeParser implements ISourceCodeParser { case IGCCToken.t__attribute__: case IGCCToken.tTT_underlying_type: + // msvc-compatibility + case IGCCToken.t__declspec: + // content assist case IToken.tCOMPLETION: return true;