diff options
-rw-r--r-- | lib/Serialization/ASTReader.cpp | 2 | ||||
-rw-r--r-- | test/PCH/cxx-functions.cpp | 10 | ||||
-rw-r--r-- | test/PCH/cxx-functions.h | 1 |
3 files changed, 12 insertions, 1 deletions
diff --git a/lib/Serialization/ASTReader.cpp b/lib/Serialization/ASTReader.cpp index 9436bfb50b..840fa13282 100644 --- a/lib/Serialization/ASTReader.cpp +++ b/lib/Serialization/ASTReader.cpp @@ -3898,9 +3898,9 @@ QualType ASTReader::readTypeRecord(unsigned Index) { ExceptionSpecificationType EST = static_cast<ExceptionSpecificationType>(Record[Idx++]); EPI.ExceptionSpecType = EST; + SmallVector<QualType, 2> Exceptions; if (EST == EST_Dynamic) { EPI.NumExceptions = Record[Idx++]; - SmallVector<QualType, 2> Exceptions; for (unsigned I = 0; I != EPI.NumExceptions; ++I) Exceptions.push_back(readType(*Loc.F, Record, Idx)); EPI.Exceptions = Exceptions.data(); diff --git a/test/PCH/cxx-functions.cpp b/test/PCH/cxx-functions.cpp new file mode 100644 index 0000000000..74df01a094 --- /dev/null +++ b/test/PCH/cxx-functions.cpp @@ -0,0 +1,10 @@ +// Test this without pch. +// RUN: %clang_cc1 -include %S/cxx-functions.h -fsyntax-only -verify %s + +// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx-functions.h +// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s + + +void test_foo() { + foo(); +} diff --git a/test/PCH/cxx-functions.h b/test/PCH/cxx-functions.h new file mode 100644 index 0000000000..8aa49869a9 --- /dev/null +++ b/test/PCH/cxx-functions.h @@ -0,0 +1 @@ +void foo() throw( int, short, char, float, double ); |