staronj abandoned this revision.
staronj marked 9 inline comments as done.
staronj added a comment.
Because of https://reviews.llvm.org/D21619 the check is no longer required.
https://reviews.llvm.org/D21303
___
cfe-commits mailing list
cfe-commits@
kuhar created this revision.
kuhar added a project: clang-tools-extra.
When there is a push_back with a call to make_pair, turn it into emplace_back
and remove the unnecessary make_pair call.
Eg.
std::vector> v;
v.push_back(std::make_pair(1, 2)); // --> v.emplace_back(1, 2);
make_pair does
JonasToth added a comment.
please note this enhancement in the ReleaseNotes.
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:93
+ to(functionDecl(hasName("::std::make_pair"
+
+ .bind("make_pair"));
is the new lin
Prazek added inline comments.
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:93
+ to(functionDecl(hasName("::std::make_pair"
+
+ .bind("make_pair"));
JonasToth wrote:
> is the new line here necessary? i think it l
madsravn updated this revision to Diff 96303.
madsravn added a comment.
Small changes to code due to comments.
https://reviews.llvm.org/D30158
Files:
clang-tidy/modernize/CMakeLists.txt
clang-tidy/modernize/ModernizeTidyModule.cpp
clang-tidy/modernize/ReplaceRandomShuffleCheck.cpp
clang
Prazek added inline comments.
Comment at: test/clang-tidy/modernize-use-emplace.cpp:284
+ // CHECK-FIXES: v.emplace_back(42LL, 13);
+
+ v.push_back(std::make_pair(0, 3));
I would add here test like:
class X {
X(std:;pair a) {}
};
std::vector v;
Author: vmiklos
Date: Sun Apr 23 11:07:06 2017
New Revision: 301130
URL: http://llvm.org/viewvc/llvm-project?rev=301130&view=rev
Log:
clang-rename: fix formatting
As detected by clang-format.
Modified:
clang-tools-extra/trunk/clang-rename/RenamingAction.cpp
clang-tools-extra/trunk/clang-
Prazek marked an inline comment as done.
Prazek added inline comments.
Comment at: lib/CodeGen/CGExprScalar.cpp:3066-3067
+} else { // Unsigned integers and pointers.
+ if (CGF.CGM.getCodeGenOpts().StrictVTablePointers &&
+ CGF.CGM.getCodeGenOpts().OptimizationL
Prazek updated this revision to Diff 96311.
Prazek marked an inline comment as done.
Prazek added a comment.
Addressing Richard's comment
https://reviews.llvm.org/D32378
Files:
lib/CodeGen/CGExprScalar.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
Index: test/CodeGenCXX/strict-vtable-poin
Prazek updated this revision to Diff 96312.
Prazek added a comment.
- Inserting barrier with -O0
https://reviews.llvm.org/D31830
Files:
lib/CodeGen/CGExpr.cpp
test/CodeGenCXX/strict-vtable-pointers.cpp
Index: test/CodeGenCXX/strict-vtable-pointers.cpp
==
aaron.ballman added a comment.
Ping. (If I don't hear back, I will assume this is noncontroversial and go
ahead and commit sometime next week.)
https://reviews.llvm.org/D32181
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llv
Prazek added a comment.
This is actually good catch, we also need to do it when inserting barrier in
placement new.
I think that for the ctors and dtors we can do it only with optimizations
enabled, because if optimizations are not enabled then ctors and dtors won't
have the invariant.group in
aaron.ballman added a comment.
In https://reviews.llvm.org/D31542#734455, @joshz wrote:
> Are there any further changes I should make, or is this good to submit now?
>
> Thanks!
This still LGTM, so it's good to submit. Do you still need someone to land the
patch for you?
Repository:
rL LLV
aaron.ballman added a comment.
This continues to LGTM; do you need someone to land the patch for you?
Comment at: test/clang-tidy/modernize-replace-random-shuffle.cpp:40
+
+
+ std::shuffle(vec.begin(), vec.end());
Can remove the extra newline.
https://review
Prazek created this revision.
Herald added a subscriber: mehdi_amini.
To not break LTO with different optimizations levels, we should insert
the barrier regardles of optimization level.
https://reviews.llvm.org/D32401
Files:
lib/CodeGen/CGExprCXX.cpp
Index: lib/CodeGen/CGExprCXX.cpp
===
Author: jlebar
Date: Sun Apr 23 11:58:48 2017
New Revision: 301132
URL: http://llvm.org/viewvc/llvm-project?rev=301132&view=rev
Log:
Add missing acquire_load to call_once overload.
Summary: Seemed to have been overlooked in D24028.
This bug was found and brought to my attention by Paul Wankadia.
madsravn added a comment.
In https://reviews.llvm.org/D30158#734810, @aaron.ballman wrote:
> This continues to LGTM; do you need someone to land the patch for you?
I will remove the extra newline and land the patch tomorrow. Thanks! :)
https://reviews.llvm.org/D30158
__
rjmccall added a comment.
Won't you have the exact same problem when LTO'ing with code that wasn't
compiled with strict v-table pointers?
https://reviews.llvm.org/D32401
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/
mehdi_amini added a comment.
> To not break LTO with different optimizations levels, we should insert the
> barrier regardles of optimization level.
What do you mean by "break"? Is it a correctness issue?
https://reviews.llvm.org/D32401
___
cfe-co
adamf created this revision.
In function CodeGenPGO::skipRegionMappingForDecl there is possible NULL pointer
dereference on line:
auto Loc = D->getBody()->getLocStart();
Value returned by getBody may be NULL.
In corresponding test it happens during processing the virtual destructor ~A.
(minor)
Author: nicholas
Date: Sun Apr 23 15:46:58 2017
New Revision: 301138
URL: http://llvm.org/viewvc/llvm-project?rev=301138&view=rev
Log:
Fix typo in comment.
Modified:
cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h
URL:
http://llv
teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.
This also disables warnings for `-MD` and `-MMD` which shouldn't happen as
we're actually compiling code here and are probably compiling a project. E.g.
for people that use thi
Prazek added a comment.
In https://reviews.llvm.org/D32401#734870, @rjmccall wrote:
> Won't you have the exact same problem when LTO'ing with code that wasn't
> compiled with strict v-table pointers?
No, because we fire error when combining module compiled with and without
StrictVtablePoint
rjmccall added a comment.
I continue to be really uncomfortable with the entire design of this
optimization, which appears to miscompile code by default, but as long as
nobody's suggesting that we actually turn it on by default, I guess it can be
your little research-compiler playground. It mi
kuhar updated this revision to Diff 96329.
kuhar added a comment.
Add test for pair constructor argument, mention changes in release notes.
https://reviews.llvm.org/D32395
Files:
clang-tidy/modernize/UseEmplaceCheck.cpp
docs/ReleaseNotes.rst
test/clang-tidy/modernize-use-emplace.cpp
Inde
kuhar marked 2 inline comments as done.
kuhar added inline comments.
Comment at: clang-tidy/modernize/UseEmplaceCheck.cpp:93
+ to(functionDecl(hasName("::std::make_pair"
+
+ .bind("make_pair"));
Prazek wrote:
> JonasTot
nlewycky created this revision.
Make ObjCBoxedExpr less of a special case, teach the expression evaluator to
handle it in general, sometimes descending through to its subexpr. Remove the
code that called CheckForIntOverflow from outside BuildObjCBoxedExpr, leaving
its only caller CheckCompleted
kuhar updated this revision to Diff 96332.
kuhar marked an inline comment as done.
kuhar added a comment.
Update modernize-use-emplace rst docs.
https://reviews.llvm.org/D32395
Files:
clang-tidy/modernize/UseEmplaceCheck.cpp
docs/ReleaseNotes.rst
docs/clang-tidy/checks/modernize-use-empla
enyquist marked 2 inline comments as done.
enyquist added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:413
+
+ while (Param && !Param->is(tok::l_paren)) {
+if (!Param->is(tok::identifier) && !Param->is(tok::comma))
djasper wrote:
> enyquist
enyquist updated this revision to Diff 96333.
enyquist marked an inline comment as done.
enyquist added a comment.
Addressed comments
Repository:
rL LLVM
https://reviews.llvm.org/D28462
Files:
docs/ClangFormatStyleOptions.rst
include/clang/Format/Format.h
lib/Format/Format.cpp
lib/Fo
djasper added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:431
+
+ // Special case for AlignTokens: for all other alignment cases,
+ // the current sequence is ended when a comma or a scope change
enyquist wrote:
> djasp
bcraig created this revision.
Herald added a subscriber: mgorny.
Visual Studio 2015 and 2017 don't implement include_next, so we'll use a
combination of a computed include and a CMAKE input to make it work. Also,
retrofit all the existing invocations of #include_next that we could hit in a
hyp
nlewycky created this revision.
Remove clang::Sema::CheckForIntOverflow(E) by calling into
E->EvaluateForOverflow instead. CheckForIntOverflow implemented a whitelist of
top-level expressions to check, currently BinaryOperator and InitListExpr.
Two changes are made to avoid regression with the
enyquist added inline comments.
Comment at: lib/Format/WhitespaceManager.cpp:431
+
+ // Special case for AlignTokens: for all other alignment cases,
+ // the current sequence is ended when a comma or a scope change
djasper wrote:
> enyqu
halyavin added a comment.
Here is how we solved this problem in our libc++ fork:
#define _LIBCPP_UCRT_INCLUDE(x) <../ucrt/x>
#define _LIBCPP_MSVC_INCLUDE(x) <../../VC/include/x>
#ifdef _LIBCPP_COMPILER_MSVC
#include _LIBCPP_UCRT_INCLUDE(wchar.h)
#else
#include_next
#endif
As fa
xiangzhai updated this revision to Diff 96344.
xiangzhai added a comment.
Hi Artem,
Because `memcpy` checked NULL pointer dereference for `src`:
state = checkNonNull(C, state, Source, srcVal);
...
so such testcase can not point out my fault:
void f15 () {
36 matches
Mail list logo