[LLVMbugs] [Bug 16880] New: Clang crashes when taking sizeof() of undeduced auto variable of ranged for loop
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 13 17:35:48 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16880
Bug ID: 16880
Summary: Clang crashes when taking sizeof() of undeduced auto
variable of ranged for loop
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: rtrieu at google.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Repro:
void test() {
for (auto &A : X){
int x = sizeof(A);
}
}
Commandline:
clang -std=c++11 testing.cc
Output:
testing.cc:2:18: error: use of undeclared identifier 'X'
for (auto &A : X){
^
clang-3.3: llvm/tools/clang/lib/AST/ASTContext.cpp:1645: std::pair<long
unsigned int, unsigned int> clang::ASTContext::getTypeInfoImpl(const
clang::Type*) const: Assertion `!A->getDeducedType().isNull() && "cannot
request the size of an undeduced or dependent auto type"' failed.
--
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/20130814/f601ae93/attachment.html>
More information about the llvm-bugs
mailing list