2015-10-13 11:28:53 -07:00
|
|
|
==================================================
|
|
|
|
|
function calls
|
|
|
|
|
==================================================
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
printf("hello %s", "world");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
(translation_unit (function_definition
|
|
|
|
|
(type_specifier (identifier))
|
|
|
|
|
(declarator (direct_declarator (direct_declarator (identifier))))
|
|
|
|
|
(function_body (compound_statement
|
|
|
|
|
(expression_statement (call_expression (identifier) (string) (string)))))))
|
|
|
|
|
|
|
|
|
|
==================================================
|
2015-10-22 11:42:38 -07:00
|
|
|
template function / relational expression ambiguities
|
2015-10-13 11:28:53 -07:00
|
|
|
==================================================
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
someVariable < someValue > 0.0;
|
2015-11-05 21:21:15 -08:00
|
|
|
someTemplate<SomeType>(0, 0);
|
2015-10-13 11:28:53 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
(translation_unit (function_definition
|
|
|
|
|
(type_specifier (identifier))
|
|
|
|
|
(declarator (direct_declarator (direct_declarator (identifier))))
|
|
|
|
|
(function_body (compound_statement
|
|
|
|
|
(expression_statement
|
|
|
|
|
(relational_expression
|
|
|
|
|
(relational_expression (identifier) (identifier))
|
|
|
|
|
(number)))
|
|
|
|
|
(expression_statement
|
|
|
|
|
(call_expression
|
|
|
|
|
(template_call (identifier) (type_id (type_specifier (identifier))))
|
2015-11-05 21:21:15 -08:00
|
|
|
(number) (number)))))))
|
2015-10-22 11:42:38 -07:00
|
|
|
|
|
|
|
|
==================================================
|
|
|
|
|
template class / relational expression ambiguities
|
|
|
|
|
==================================================
|
|
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
|
SomeTemplate<SomeType> someVariable = 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
(translation_unit (function_definition
|
|
|
|
|
(type_specifier (identifier))
|
|
|
|
|
(declarator (direct_declarator (direct_declarator (identifier))))
|
|
|
|
|
(function_body (compound_statement
|
|
|
|
|
(simple_declaration
|
2015-11-11 16:54:00 -08:00
|
|
|
(type_specifier (template_call (identifier) (type_id (type_specifier (identifier)))))
|
2015-10-22 11:42:38 -07:00
|
|
|
(init_declarator
|
|
|
|
|
(declarator (direct_declarator (identifier)))
|
|
|
|
|
(initializer (initializer_clause (number)))))))))
|