New user self-registration is disabled due to spam. For an account please email bugs-admin@lists.llvm.org with your e-mail address and full name.

Bug 32896 - modernize-use-emplace removes constructor calls with initializer-list parameters
Summary: modernize-use-emplace removes constructor calls with initializer-list parameters
Status: RESOLVED FIXED
Alias: None
Product: clang-tools-extra
Classification: Unclassified
Component: clang-tidy (show other bugs)
Version: unspecified
Hardware: All All
: P normal
Assignee: Jakub Kuderski
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-02 11:15 PDT by Jakub Kuderski
Modified: 2017-05-15 20:43 PDT (History)
4 users (show)

See Also:
Fixed By Commit(s):


Attachments
repro (549 bytes, text/plain)
2017-05-02 11:15 PDT, Jakub Kuderski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Kuderski 2017-05-02 11:15:25 PDT
Created attachment 18393 [details]
repro

modernize-use-emplace removes constructor calls with initializer-list parameters. After applying fixits, code doesn't compile.

Eg.

typedef std::vector<unsigned char> Unit;
typedef std::vector<Unit> UnitVector;
UnitVector InitialCorpus;
InitialCorpus.push_back(Unit({'\n'})); // --> InitialCorpus.emplace_back({'\n'})

The bug is present in the 4.0 release.
Comment 1 Jakub Kuderski 2017-05-02 15:55:26 PDT
https://reviews.llvm.org/D32767
Comment 2 Jakub Kuderski 2017-05-05 14:56:40 PDT
Fixed by r302281