From a91746c1453dc280f22a0d90acbbc503ab5ea886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20M=C3=BCller?= Date: Mon, 12 Mar 2018 11:26:56 +0100 Subject: [PATCH] Improve variadic token workaround --- src/libclang/cxtokenizer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libclang/cxtokenizer.cpp b/src/libclang/cxtokenizer.cpp index a3e5aeb..3448e42 100644 --- a/src/libclang/cxtokenizer.cpp +++ b/src/libclang/cxtokenizer.cpp @@ -243,6 +243,11 @@ namespace { // variadic tokens in unnamed parameter not included end = get_next_location(tu, file, end, 3); + if (token_after_is(tu, file, cur, end, ".")) + // extra whitespace, so bump again + // this should all go away once I redid the whole token thing... + end = get_next_location(tu, file, end, 1); + DEBUG_ASSERT(token_after_is(tu, file, cur, end, ">") || token_after_is(tu, file, cur, end, ","), detail::parse_error_handler{}, cur,