1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-02 05:03:36 +02:00
cdt/core/org.eclipse.cdt.core
Igor V. Kovalenko 57a32fc521 Scan for more template-id alternatives in expression, bug 497931
If parsing expression part for an alternative terminates with BacktrackException,
selectFallback() would short-circuit to the longest remaining variant. If that
happens to successfully complete parsing till the end of expression token
sequence, all of remaining variants are discarded, including the first found
alternative which was to parse identifier as template name.

This causes expression() to only consider one branchpoint out of all possible
variants. Allow it to find more variants by scanning through all branchpoints
looking for the alternative with leftmost parsed boundary.

This is probably still not ideal but fixes this common std library construct:

  template <typename T>
  inline constexpr bool X = true;
  template <typename T>
  inline constexpr bool Y = true;

  template<typename T> bool predicate() {
    return X<T> && Y<T>; // CDT finds this one: (X) < (T) > (&&Y<T>)
                         // Fix it to also consider (X<T>) && (Y<T>)
  }

Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=497931
2023-02-27 13:59:08 -05:00
..
.settings Add support for DW_FORM_line_strp 2023-01-16 20:47:09 +00:00
browser/org/eclipse/cdt Remove unreachable code 2020-11-03 14:33:15 -05:00
doxygen/org/eclipse/cdt/doxygen Bug 562997 - Switch CDT doxygen to use new Equinox preferences API 2020-05-09 11:42:57 -04:00
META-INF Add and correct since tags for new API in 8.1.0 2023-01-28 10:52:07 -05:00
model/org/eclipse/cdt Add basic support for c++20 three-way comparison operator 2023-01-28 10:52:07 -05:00
OSGI-INF Bug 559193 - Rework DoxygenPreferences to encapsulate constants 2020-01-22 11:47:43 -05:00
parser/org/eclipse/cdt Scan for more template-id alternatives in expression, bug 497931 2023-02-27 13:59:08 -05:00
schema Bug 570992: Fix templates extension point documentation 2021-02-07 04:03:44 -05:00
src/org/eclipse/cdt Bug 552070 - Build not configured correctly error while building a project 2023-01-25 14:23:14 -05:00
templateengine/org/eclipse/cdt [releng] Apply auto-clean of save to all files with Eclipse 4.23 2022-04-19 20:13:15 -04:00
utils/org/eclipse/cdt Add and correct since tags for new API in 8.1.0 2023-01-28 10:52:07 -05:00
.classpath Update to Java 17 as BREE. Fixes #80 2022-10-03 12:42:37 -04:00
.options
.project Remove unused C Nature from cdt core 2020-11-03 14:29:40 -05:00
about.html [releng] Update all legal files with update_legal_files.sh 2022-04-13 13:42:35 -04:00
build.properties Bug 565154 - Delete CDT Core Options API 2020-08-01 05:54:03 -04:00
plugin.properties Do not mark "removing unused section" lines as errors (#19) 2022-08-22 11:42:57 -04:00
plugin.xml Remove deprecated binary parsers and supporting code 2022-11-07 20:58:25 -05:00