]> granicus.if.org Git - clang/commit
Switch the CharSourceRange array to a small vector. The array was
authorChandler Carruth <chandlerc@gmail.com>
Wed, 7 Sep 2011 01:47:09 +0000 (01:47 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 7 Sep 2011 01:47:09 +0000 (01:47 +0000)
commit5182a1858f4483c7289997d365ba3e103cd7d1b7
treec5d5a178e5811ee37f18189605fddabb037dd5c4
parentc83b975f1fb9d11e10b5aa25029ae9bb5fa80e07
Switch the CharSourceRange array to a small vector. The array was
a stack array of a magical size with an assert() that we never
overflowed it. That seems incredibly risky. We also have a very nice API
for bundling up a vector we expect to usually have a small size without
loss of functionality or security if the size is excessive.

The fallout is to remove the last pointer+size parameter pair that are
traced through the recursive caret diagnostic emission.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139217 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Frontend/TextDiagnosticPrinter.h
lib/Frontend/TextDiagnosticPrinter.cpp