[llvm-bugs] [Bug 26584] New: crash on invalid with switch containing static local inside invalid function
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Feb 11 15:10:40 PST 2016
https://llvm.org/bugs/show_bug.cgi?id=26584
Bug ID: 26584
Summary: crash on invalid with switch containing static local
inside invalid function
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: richard-llvm at metafoo.co.uk
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
This causes Clang to crash / assert:
#define A B B B B B B B B B B
#define B C C C C C C C C C C
#define C D D D D D D D D D D
#define D E E E E E E E E E E
#define E F F F F F F F F F F
#define F { int n = 0; (void)n; }
void f() { A }
class Foo {};
class Bar {
void Baz();
};
namespace {
void Bar::Baz() {
switch (0) static Foo foo;
switch (0) static Foo foo;
switch (0) static Foo foo;
}
The assertion is:
include/llvm/ADT/SmallVector.h:164: reference
llvm::SmallVectorTemplateCommon<clang::SwitchStmt *, void>::back() [T =
clang::SwitchStmt *]: Assertion `!empty()' failed.
within clang::Sema::ActOnFinishSwitchStmt(clang::SourceLocation, clang::Stmt*,
clang::Stmt*).
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160211/12c04909/attachment.html>
More information about the llvm-bugs
mailing list