r345362 - PR31978: Don't crash if CodeGen sees a top-level BindingDecl.
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 25 20:21:20 PDT 2018
Author: rsmith
Date: Thu Oct 25 20:21:20 2018
New Revision: 345362
URL: http://llvm.org/viewvc/llvm-project?rev=345362&view=rev
Log:
PR31978: Don't crash if CodeGen sees a top-level BindingDecl.
Modified:
cfe/trunk/lib/CodeGen/CodeGenModule.cpp
cfe/trunk/test/Parser/cxx1z-decomposition.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenModule.cpp?rev=345362&r1=345361&r2=345362&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Thu Oct 25 20:21:20 2018
@@ -4800,6 +4800,7 @@ void CodeGenModule::EmitTopLevelDecl(Dec
case Decl::TypeAliasTemplate:
case Decl::Block:
case Decl::Empty:
+ case Decl::Binding:
break;
case Decl::Using: // using X; [C++]
if (CGDebugInfo *DI = getModuleDebugInfo())
Modified: cfe/trunk/test/Parser/cxx1z-decomposition.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/cxx1z-decomposition.cpp?rev=345362&r1=345361&r2=345362&view=diff
==============================================================================
--- cfe/trunk/test/Parser/cxx1z-decomposition.cpp (original)
+++ cfe/trunk/test/Parser/cxx1z-decomposition.cpp Thu Oct 25 20:21:20 2018
@@ -1,4 +1,5 @@
// RUN: %clang_cc1 -std=c++1z %s -verify -fcxx-exceptions
+// RUN: not %clang_cc1 -std=c++1z %s -emit-llvm-only -fcxx-exceptions
struct S { int a, b, c; };
More information about the cfe-commits
mailing list