summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/DeclSpec.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-05-14 23:22:32 +0000
committerDouglas Gregor <dgregor@apple.com>2013-05-14 23:22:32 +0000
commit230826cc424577759568edd39089181389a44919 (patch)
treec8892444784ac042b68a3b599f67180fbf50282d /clang/lib/Sema/DeclSpec.cpp
parent609a433159e835c20d863cc562df496e88cb1167 (diff)
downloadbcm5719-llvm-230826cc424577759568edd39089181389a44919.tar.gz
bcm5719-llvm-230826cc424577759568edd39089181389a44919.zip
Don't mark a type specifier as "owned" if there is no declaration to own.
This simplifies error recovery elsewhere, eliminating the crash in <rdar://problem/13853540>. llvm-svn: 181846
Diffstat (limited to 'clang/lib/Sema/DeclSpec.cpp')
-rw-r--r--clang/lib/Sema/DeclSpec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/DeclSpec.cpp b/clang/lib/Sema/DeclSpec.cpp
index 3b3ab2c27b4..dfce324b702 100644
--- a/clang/lib/Sema/DeclSpec.cpp
+++ b/clang/lib/Sema/DeclSpec.cpp
@@ -651,7 +651,7 @@ bool DeclSpec::SetTypeSpecType(TST T, SourceLocation TagKwLoc,
DeclRep = Rep;
TSTLoc = TagKwLoc;
TSTNameLoc = TagNameLoc;
- TypeSpecOwned = Owned;
+ TypeSpecOwned = Owned && Rep != 0;
return false;
}
OpenPOWER on IntegriCloud