[all-commits] [llvm/llvm-project] 94e8bd: [clang] Fix crash upon stray coloncolon token in C...
inclyc via All-commits
all-commits at lists.llvm.org
Tue Oct 18 06:58:21 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 94e8bd002c81ace308ddac9b66385ef932655fd3
https://github.com/llvm/llvm-project/commit/94e8bd002c81ace308ddac9b66385ef932655fd3
Author: Jialun Hu <jialun_hu at apple.com>
Date: 2022-10-18 (Tue, 18 Oct 2022)
Changed paths:
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Parse/Parser.h
M clang/lib/Parse/ParseDecl.cpp
M clang/lib/Parse/Parser.cpp
M clang/test/Parser/c2x-attributes.c
Log Message:
-----------
[clang] Fix crash upon stray coloncolon token in C2x mode
The parser assumes that the lexer never emits coloncolon token for C code, but this assumption no longer holds in C2x attribute namespaces. As a result, stray coloncolon tokens out of attributes cause assertion failures and hangs in release build, which this patch tries to handle.
Crash input minimal example: `T n::v`
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D133248
More information about the All-commits
mailing list