[llvm-bugs] [Bug 27120] New: Feature request: warn on 'auto a = new int'
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Mar 29 13:25:12 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27120
Bug ID: 27120
Summary: Feature request: warn on 'auto a = new int'
Product: clang
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: vmpstr at chromium.org
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
In the project that I'm working on, we disallow using auto if auto would deduce
to be a raw pointer type. That is,
auto a = new int; // Disallowed. auto is 'int*'.
auto* b = new int; // OK. auto is 'int'.
This could be done via a clang plugin, but it's also a good optional warning in
clang.
What do you peeps think?
--
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/20160329/81733f39/attachment.html>
More information about the llvm-bugs
mailing list