Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Support for C++14 constexpr evaluation

Does anybody know the reason for ICPPField.getFieldPosition() method returning byte instead of int? Classes can have more than 127 fields, can't they? This is causing  https://bugs.eclipse.org/bugs/show_bug.cgi?id=501616.

-sergey

On Fri, Sep 16, 2016 at 1:43 PM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> wrote:

On Fri, Sep 16, 2016 at 1:33 PM, Sergey Prigogin <eclipse.sprigogin@xxxxxxxxx> wrote:
Thank you, Toni, Silvano and Nathan. This is a great contribution.

So far I'm seeing a bunch of NPEs like:
java.lang.NullPointerException
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.computeForFunctionCall(EvalFunctionCall.java:228)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecReturn.executeForFunctionCall(ExecReturn.java:37)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.evaluateFunctionBody(EvalFunctionCall.java:302)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.computeForFunctionCall(EvalFunctionCall.java:263)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.ExecReturn.executeForFunctionCall(ExecReturn.java:37)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.evaluateFunctionBody(EvalFunctionCall.java:302)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.getValue(EvalFunctionCall.java:155)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPTemplateNonTypeArgument.<init>(CPPTemplateNonTypeArgument.java:39)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.instantiateArgument(CPPTemplates.java:1425)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.instantiateArguments(CPPTemplates.java:1392)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.resolveDeferredClassInstance(CPPTemplates.java:2970)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.resolveUnknown(CPPTemplates.java:2889)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.instantiateType(CPPTemplates.java:1506)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getBases(AbstractCPPClassSpecializationScope.java:190)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.hasInheritedConstructorsSources(AbstractCPPClassSpecializationScope.java:302)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getOwnInheritedConstructors(AbstractCPPClassSpecializationScope.java:274)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getConstructors(AbstractCPPClassSpecializationScope.java:263)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassSpecialization.getConstructors(CPPClassSpecialization.java:286)
at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getConstructors(ClassTypeHelper.java:261)
at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getInheritedConstructors(ClassTypeHelper.java:527)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getOwnInheritedConstructors(AbstractCPPClassSpecializationScope.java:286)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getConstructors(AbstractCPPClassSpecializationScope.java:263)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassSpecialization.getConstructors(CPPClassSpecialization.java:286)
at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getConstructors(ClassTypeHelper.java:261)
at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getInheritedConstructors(ClassTypeHelper.java:527)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getOwnInheritedConstructors(AbstractCPPClassSpecializationScope.java:286)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getConstructors(AbstractCPPClassSpecializationScope.java:263)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassSpecialization.getConstructors(CPPClassSpecialization.java:286)
at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getConstructors(ClassTypeHelper.java:261)
at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getInheritedConstructors(ClassTypeHelper.java:527)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getOwnInheritedConstructors(AbstractCPPClassSpecializationScope.java:286)
at org.eclipse.cdt.internal.core.dom.parser.cpp.AbstractCPPClassSpecializationScope.getConstructors(AbstractCPPClassSpecializationScope.java:263)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassSpecialization.getConstructors(CPPClassSpecialization.java:286)
at org.eclipse.cdt.internal.core.dom.parser.cpp.ClassTypeHelper.getConstructors(ClassTypeHelper.java:261)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.findImplicitlyCalledConstructor(CPPSemantics.java:3531)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.findImplicitlyCalledConstructor(CPPSemantics.java:3502)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.findImplicitlyCalledConstructor(CPPSemantics.java:3450)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.findImplicitlyCalledConstructor(CPPSemantics.java:3431)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTConstructorChainInitializer.getImplicitNames(CPPASTConstructorChainInitializer.java:246)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTConstructorChainInitializer.accept(CPPASTConstructorChainInitializer.java:121)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition.accept(CPPASTFunctionDefinition.java:209)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompositeTypeSpecifier.accept(CPPASTCompositeTypeSpecifier.java:199)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration.accept(CPPASTSimpleDeclaration.java:100)
at org.eclipse.cdt.internal.core.dom.parser.ASTTranslationUnit.accept(ASTTranslationUnit.java:265)
at org.eclipse.cdt.internal.core.pdom.PDOMWriter.process(PDOMWriter.java:505)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.writeToIndex(AbstractIndexerTask.java:1288)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseFile(AbstractIndexerTask.java:1104)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseLinkage(AbstractIndexerTask.java:933)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.runTask(AbstractIndexerTask.java:560)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask.run(PDOMIndexerTask.java:161)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMRebuildTask.run(PDOMRebuildTask.java:90)
at org.eclipse.cdt.internal.core.pdom.PDOMIndexerJob.run(PDOMIndexerJob.java:155)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Will investigate.

-sergey

On Fri, Sep 16, 2016 at 12:19 AM, Nathan Ridge <zeratul976@xxxxxxxxxxx> wrote:

Hi folks,

Today I committed to the master branch a significant contribution by Toni Suter, a student at the Swiss university HSR.

This contribution, tracked in bug 490475, adds support for C++14 constexpr evaluation, and introduces supporting infrastructure to instantiate function bodies and store them in the index.

In addition to advancing the state of our C++14 support, the supporting infrastructure to instantiate function bodies opens up many new possibilities for CDT features, such as Codan checking for and reporting errors that are instantiation-dependent, or "Find References" finding function calls that occur in a dependent context inside a template.

Toni, and before him another student Silvano Brugnoni, have been working on this for a long time, and after many rounds of review and testing we have finally merged it.

I'd like to extend a big thank you to Toni, to Silvano, and to their supervisor Peter Sommerlad, for this contribution!

As with any significant change, there is a risk of regressions. I have tested the change extensively on my own projects, but it's possible there are issues I didn't catch. My hope is that landing this early in the 9.2 cycle will give us plenty of time to work out any latent issues by the time the code becomes part of a release. If you do encounter regressions in parser or indexer functionality, please file bugs and cc me, and I will investigate them.

Regards,
Nate
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev




Back to the top