Go to file
Nico Weber c29c4835df Don't crash on surprising tokens in default parameter template lists.
Fixes this snippet from SLi's afl fuzzer output:

  class {
      i (x = <, enum

This parsed i as a function, x as a paramter, and the stuff after < as a
template list.  This then called TryConsumeDeclarationSpecifier() which
called TryAnnotateCXXScopeToken() without checking the preconditions of
this function.  Check them before calling, like all other callers of
TryAnnotateCXXScopeToken() do.

A more readable reproducer that causes the same crash is

  class {
      void i(int x = MyTemplateClass<int, union int>::foo());
  };

The reduced version used an eof token as surprising token, but kw_int works
just as well to repro and is easier to insert into a test file.

llvm-svn: 224906
2014-12-28 23:24:02 +00:00
clang Don't crash on surprising tokens in default parameter template lists. 2014-12-28 23:24:02 +00:00
clang-tools-extra Fixed a typo in a comment. NFC. 2014-12-19 15:37:02 +00:00
compiler-rt Escape ? to silence GCC warning about trigraphs. 2014-12-26 18:21:34 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Remove wrong semi-colons 2014-12-19 09:18:23 +00:00
libcxx Prevent ill-formed instantiation of __invoke_of<...> during the evaluation of a bind expression. Fixes PR22003. 2014-12-23 05:54:34 +00:00
libcxxabi Silence warnings in libunwind. 2014-12-21 14:22:00 +00:00
lld [Mips] Replace stderr output by the `llvm_unreachable` call 2014-12-25 09:23:47 +00:00
lldb Add support for frameless function compact unwind encodings on x86_64/i386. 2014-12-22 11:02:02 +00:00
llgo irgen: do not emit an extra terminator for panic thunks 2014-12-28 22:39:01 +00:00
llvm [X86][ISel] Fix a regression I introduced in r224884 2014-12-28 15:20:57 +00:00
openmp I apologise in advance for the size of this check-in. At Intel we do 2014-10-07 16:25:50 +00:00
polly (diagnostics) fix typo in test... 2014-12-19 17:22:46 +00:00