aboutsummaryrefslogtreecommitdiff
path: root/lib/Frontend/PCHWriterStmt.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-07-13 15:54:32 +0000
committerDouglas Gregor <dgregor@apple.com>2010-07-13 15:54:32 +0000
commit4bd40318cbea15310a37343db46de96c4fcc15e6 (patch)
treee77167e0d7eecd0192a31c03d8f5fc206fec6c72 /lib/Frontend/PCHWriterStmt.cpp
parent9b36c3f0de0105e903130bbda3c4aea7d792c0af (diff)
Downgrade the "when type is in parentheses, array cannot have dynamic
size" error for code like new (int [size]) to a warning, add a Fix-It to remove the parentheses, and make this diagnostic work properly when it occurs in a template instantiation. <rdar://problem/8018245>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108242 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/PCHWriterStmt.cpp')
-rw-r--r--lib/Frontend/PCHWriterStmt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Frontend/PCHWriterStmt.cpp b/lib/Frontend/PCHWriterStmt.cpp
index d6beda8bab..75377286e5 100644
--- a/lib/Frontend/PCHWriterStmt.cpp
+++ b/lib/Frontend/PCHWriterStmt.cpp
@@ -1070,7 +1070,6 @@ void PCHStmtWriter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) {
void PCHStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) {
VisitExpr(E);
Record.push_back(E->isGlobalNew());
- Record.push_back(E->isParenTypeId());
Record.push_back(E->hasInitializer());
Record.push_back(E->isArray());
Record.push_back(E->getNumPlacementArgs());
@@ -1078,6 +1077,7 @@ void PCHStmtWriter::VisitCXXNewExpr(CXXNewExpr *E) {
Writer.AddDeclRef(E->getOperatorNew(), Record);
Writer.AddDeclRef(E->getOperatorDelete(), Record);
Writer.AddDeclRef(E->getConstructor(), Record);
+ Writer.AddSourceRange(E->getTypeIdParens(), Record);
Writer.AddSourceLocation(E->getStartLoc(), Record);
Writer.AddSourceLocation(E->getEndLoc(), Record);
for (CXXNewExpr::arg_iterator I = E->raw_arg_begin(), e = E->raw_arg_end();