[LLVMbugs] [Bug 23314] New: duplicate brace crashes treeTransform

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 22 08:09:22 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23314

            Bug ID: 23314
           Summary: duplicate brace crashes treeTransform
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mjjunk47 at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

I had a duplicate brace in construction of my object:

    const wordList masterNames((fieldObjects.sortedNames());

instead of

    const wordList masterNames(fieldObjects.sortedNames());

This crashes the 'TreeTransform' pass

In file included from decomposePar.C:94:                                        
In file included from ./readFields.H:68:                                        
./readFields.C:84:60: error: expected ')'
    const wordList masterNames((fieldObjects.sortedNames());
                                                           ^
./readFields.C:84:31: note: to match this '('
    const wordList masterNames((fieldObjects.sortedNames());
                              ^
clang: TreeTransform.h:2930: clang::ExprResult
clang::TreeTransform<Derived>::TransformInitializer(clang::Expr*, bool) [with
Derived = {anonymous}::TemplateInstantiator; clang::ExprResult =
clang::ActionResult<clang::Expr*>]: Assertion `NewArgs.empty() && "no parens or
braces but have direct init with arguments?"' failed.
0  clang           0x00000000027eede2 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang           0x00000000027ee9c9
2  libpthread.so.0 0x00002b99a070e1f0
3  libc.so.6       0x00002b99a15a3065 gsignal + 53
4  libc.so.6       0x00002b99a15a44e8 abort + 328
5  libc.so.6       0x00002b99a159bf72
6  libc.so.6       0x00002b99a159c022
7  clang           0x0000000000ecbbae
8  clang           0x0000000000ecbc8b
clang::Sema::SubstInitializer(clang::Expr*,
clang::MultiLevelTemplateArgumentList const&, bool) + 75
9  clang           0x0000000000ee5383
clang::Sema::InstantiateVariableInitializer(clang::VarDecl*, clang::VarDecl*,
clang::MultiLevelTemplateArgumentList const&) + 323
10 clang           0x0000000000eee1b0
clang::Sema::BuildVariableInstantiation(clang::VarDecl*, clang::VarDecl*,
clang::MultiLevelTemplateArgumentList const&,
llvm::SmallVector<clang::Sema::LateInstantiatedAttribute, 16u>*,
clang::DeclContext*, clang::LocalInstantiationScope*, bool) + 928
11 clang           0x0000000000ef0088
clang::TemplateDeclInstantiator::VisitVarDecl(clang::VarDecl*, bool) + 376
12 clang           0x0000000000eeae1c clang::Sema::SubstDecl(clang::Decl*,
clang::DeclContext*, clang::MultiLevelTemplateArgumentList const&) + 140
1

-- 
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/20150422/49568963/attachment.html>


More information about the llvm-bugs mailing list