mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-22 06:02:11 +02:00
Bug 561128 - Allow storing all local types in the index, not just typedefs
Change-Id: I4bb76e199557e2dfe1fcab3a435434612b3334a5
This commit is contained in:
parent
5f316f4045
commit
ce97426688
2 changed files with 3 additions and 4 deletions
|
@ -282,11 +282,10 @@ public class FunctionTests extends TestBase {
|
|||
assertEvaluationEquals(58);
|
||||
}
|
||||
|
||||
// //Empty header file
|
||||
|
||||
// constexpr int f() {
|
||||
// return ([]() constexpr -> int {return 58;})();
|
||||
// }
|
||||
|
||||
// constexpr int x = f();
|
||||
public void testLambdaExpression2_560483() throws Exception {
|
||||
assertEvaluationEquals(58);
|
||||
|
|
|
@ -1270,8 +1270,8 @@ class PDOMCPPLinkage extends PDOMLinkage implements IIndexCPPBindingConstants {
|
|||
if (owner instanceof IFunction) {
|
||||
boolean isTemplateParameter = binding instanceof ICPPTemplateParameter;
|
||||
boolean ownerIsConstexprFunc = owner instanceof ICPPFunction && ((ICPPFunction) owner).isConstexpr();
|
||||
boolean isVariableOrTypedef = binding instanceof ICPPVariable || binding instanceof ITypedef;
|
||||
if (!isTemplateParameter && !(ownerIsConstexprFunc && isVariableOrTypedef)) {
|
||||
boolean isVariableOrType = binding instanceof ICPPVariable || binding instanceof IType;
|
||||
if (!isTemplateParameter && !(ownerIsConstexprFunc && isVariableOrType)) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue