mstorsjo created this revision.
This avoids a hack for making it a no-op for windows.
Also explicitly check for `_WIN32` instead of asduming it.
https://reviews.llvm.org/D39156
Files:
src/assembly.h
Index: src/assembly.h
===
-
alexfh added a comment.
Apart from all other comments, I think, this check would better be placed under
bugprone/.
Repository:
rL LLVM
https://reviews.llvm.org/D39121
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/
Author: spatel
Date: Fri Oct 20 16:32:41 2017
New Revision: 316250
URL: http://llvm.org/viewvc/llvm-project?rev=316250&view=rev
Log:
[CodeGen] add tests for __builtin_sqrt*; NFC
I don't know if this is correct, but this is what we currently do.
More discussion in PR27108 and PR27435 and D27618.
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316249: [Analyzer] Correctly handle parameters passed by
reference when bodyfarming std… (authored by george.karpenkov).
Changed prior to commit:
https://reviews.llvm.org/D39031?vs=119415&id=119724#toc
Author: george.karpenkov
Date: Fri Oct 20 16:29:59 2017
New Revision: 316249
URL: http://llvm.org/viewvc/llvm-project?rev=316249&view=rev
Log:
[Analyzer] Correctly handle parameters passed by reference when bodyfarming
std::call_once
Explicitly not supporting functor objects.
Differential Revis
smeenai created this revision.
Tip-of-tree clang produces `-Wtautological-constant-compare` for
tautological constant comparisons, and these pieces of code will trigger
that diagnostic when `int` and `long` have the same size (for example,
when compiling for a 32-bit target, or for Windows 64-bit)
Author: zturner
Date: Fri Oct 20 16:09:20 2017
New Revision: 316247
URL: http://llvm.org/viewvc/llvm-project?rev=316247&view=rev
Log:
[clang-tidy] Remove MSVC inline assembly test from cross-plat test.
This originally started out here in dev, but I moved it to another
file when it became clear th
alexfh added inline comments.
Comment at: clang-tidy/tool/ClangTidyMain.cpp:452
+ if (FoundErrors) {
+ return 1;
Failed tests reminded me of the -fix-errors flag.
I suppose, clang-tidy should not return an error code, when all errors it
noticed, contain
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316246: [clang-tidy] Don't error on MS-style inline
assembly. (authored by zturner).
Changed prior to commit:
https://reviews.llvm.org/D38549?vs=119677&id=119722#toc
Repository:
rL LLVM
https://revi
alexfh requested changes to this revision.
alexfh added a comment.
This revision now requires changes to proceed.
This patch breaks a number of tests. Please run the tests and fix the failures.
https://reviews.llvm.org/D39105
___
cfe-commits mailing
Author: zturner
Date: Fri Oct 20 16:00:51 2017
New Revision: 316246
URL: http://llvm.org/viewvc/llvm-project?rev=316246&view=rev
Log:
[clang-tidy] Don't error on MS-style inline assembly.
To get MS-style inline assembly, we need to link in the various
backends. Some other clang tools already do
Author: rsmith
Date: Fri Oct 20 15:56:25 2017
New Revision: 316245
URL: http://llvm.org/viewvc/llvm-project?rev=316245&view=rev
Log:
Implement current CWG direction for support of arrays of unknown bounds in
constant expressions.
We permit array-to-pointer decay on such arrays, but disallow point
Hello everyone,
LLVM buildmaster will be updated and restarted after 7 PM Pacific time.
Thanks
Galina
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexfh added inline comments.
Comment at: clang-tools-extra/test/clang-tidy/hicpp-no-assembler.cpp:13-16
+ _asm {
+mov al, 2;
+// CHECK-MESSAGES: :[[@LINE-2]]:3: warning: do not use inline assembler in
safety-critical code [hicpp-no-assembler]
+ }
alex
alexfh added inline comments.
Comment at: clang-tools-extra/test/clang-tidy/hicpp-no-assembler.cpp:13-16
+ _asm {
+mov al, 2;
+// CHECK-MESSAGES: :[[@LINE-2]]:3: warning: do not use inline assembler in
safety-critical code [hicpp-no-assembler]
+ }
Will
alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.
Looks good! Thank you!
https://reviews.llvm.org/D39105
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mail
mstorsjo added a comment.
Ping
https://reviews.llvm.org/D38819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
mstorsjo added a comment.
Ping @zturner and others
https://reviews.llvm.org/D38704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
arphaman updated this revision to Diff 119711.
arphaman added a comment.
Fix diff
Repository:
rL LLVM
https://reviews.llvm.org/D38982
Files:
include/clang/Basic/DiagnosticRefactoringKinds.td
include/clang/Tooling/Refactoring/ASTSelection.h
include/clang/Tooling/Refactoring/RefactoringA
arphaman added a comment.
In https://reviews.llvm.org/D38982#900744, @ioeric wrote:
> Code looks good in general. I see there are a bunch of major features
> missing; it might make sense to print a warning or document the major missing
> features in the high-level API.
I added a warning in th
arphaman updated this revision to Diff 119708.
arphaman marked 4 inline comments as done.
arphaman added a comment.
Address review comments.
Repository:
rL LLVM
https://reviews.llvm.org/D38982
Files:
include/clang/Tooling/Refactoring/RefactoringActionRuleRequirements.h
include/clang/Tool
Author: jvesely
Date: Fri Oct 20 14:10:18 2017
New Revision: 316239
URL: http://llvm.org/viewvc/llvm-project?rev=316239&view=rev
Log:
amdgcn: Add missing datalayout info to .ll files
Signed-off-by: Jan Vesely
Acked-by: Aaron Watry
Modified:
libclc/trunk/amdgcn/lib/cl_khr_int64_extended_ato
lebedev.ri updated this revision to Diff 119705.
lebedev.ri marked 5 inline comments as done.
lebedev.ri added a comment.
Addressed review notes.
For C++, enum handling clearly needs more work, because not all tautological
comparisons are actually diagnosed,
so there is no `clang/test/Sema/outo
Author: jvesely
Date: Fri Oct 20 14:00:31 2017
New Revision: 316238
URL: http://llvm.org/viewvc/llvm-project?rev=316238&view=rev
Log:
r600: Add missing datalayout to .ll files
Signed-off-by: Jan Vesely
Acked-by: Aaron Watry
Modified:
libclc/trunk/r600/lib/synchronization/barrier_impl.ll
Hahnfeld reopened this revision.
Hahnfeld added a comment.
This revision is now accepted and ready to land.
At least two buildbots failing:
http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/1175
http://lab.llvm.org:8011/builders/clang-atom-d525-fedora-rel/builds/10478
Reposi
Author: hahnfeld
Date: Fri Oct 20 13:16:17 2017
New Revision: 316235
URL: http://llvm.org/viewvc/llvm-project?rev=316235&view=rev
Log:
Revert "[OpenMP] Avoid VLAs for some reductions on array sections"
This breaks at least two buildbots:
http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-l
kosarev created this revision.
kosarev added a project: clang.
Repository:
rL LLVM
https://reviews.llvm.org/D39138
Files:
lib/CodeGen/CGCXXABI.cpp
test/CodeGen/tbaa-this.cpp
Index: test/CodeGen/tbaa-this.cpp
===
--- test/Cod
jasonmolenda added a comment.
Sorry for missing this back in August.
I think it'd be clearer to import your python once in the startup, like
-o "script import $module" \
Multiple imports are a no-op IIUC so it's harmless to re-import the module
every time the breakpoint is hit (I'm guessing it
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316229: [OpenMP] Avoid VLAs for some reductions on array
sections (authored by Hahnfeld).
Changed prior to commit:
https://reviews.llvm.org/D39136?vs=119687&id=119689#toc
Repository:
rL LLVM
https:/
Author: hahnfeld
Date: Fri Oct 20 12:40:40 2017
New Revision: 316229
URL: http://llvm.org/viewvc/llvm-project?rev=316229&view=rev
Log:
[OpenMP] Avoid VLAs for some reductions on array sections
In some cases the compiler can deduce the length of an array section
as constants. With this information
ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.
LG
https://reviews.llvm.org/D39136
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
Rakete added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:8610
+ if(!S.getLangOpts().CPlusPlus && OtherT->isEnumeralType()) {
+OtherT = OtherT->getAs()->getDecl()->getIntegerType();
Please drop the braces.
Comment at: lib/S
Hahnfeld created this revision.
In some cases the compiler can deduce the length of an array section
as constants. With this information, VLAs can be avoided in place of
a constant sized array or even a scalar value if the length is 1.
Example:
int a[4], b[2];
pragma omp parallel reduction(+:
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316225: Allow /showIncludes with /P (authored by erichkeane).
Changed prior to commit:
https://reviews.llvm.org/D39104?vs=119607&id=119686#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39104
Fil
Author: erichkeane
Date: Fri Oct 20 12:18:30 2017
New Revision: 316225
URL: http://llvm.org/viewvc/llvm-project?rev=316225&view=rev
Log:
Allow /showIncludes with /P
r213589 was checked in as a solution to
https://bugs.llvm.org/show_bug.cgi?id=20336.
However, it is possible to use /EP with /P
to
smeenai added a comment.
Sorry, this has been on my queue for a long time, but I haven't gotten the
chance to get to it yet. I'll try to take a look (at this and your other
patches) in the next few days.
https://reviews.llvm.org/D37182
___
cfe-com
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.
Thanks!
https://reviews.llvm.org/D39104
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cf
vsapsai created this revision.
When we encounter an opening parenthesis and parse the rest as type
cast, use DeclSpecContext DSC_type_specifier so we hit the existing check
that prevents defining tags in contexts where type specifier is expected.
This reverts implementation done in r313386, r3138
efriedma added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:8612
+OtherT = OtherT->getAs()->getDecl()->getIntegerType();
+ }
+
Why are you changing this here, as opposed to changing
IntRange::forValueOfCanonicalType?
Repository:
rL LLVM
https
zturner updated this revision to Diff 119677.
zturner added a comment.
Added a test. Alex, if you can confirm this test gives sufficient coverage I
can go ahead and submit today. Thanks!
https://reviews.llvm.org/D38549
Files:
clang-tools-extra/clang-tidy/CMakeLists.txt
clang-tools-extra/
On 10/17/2017 5:00 PM, Saleem Abdulrasool via cfe-commits wrote:
Author: compnerd
Date: Tue Oct 17 17:00:50 2017
New Revision: 316046
URL: http://llvm.org/viewvc/llvm-project?rev=316046&view=rev
Log:
Basic: fix __{,U}INTPTR_TYPE__ on ARM
Darwin and OpenBSD are the only platforms which use `long
Author: compnerd
Date: Fri Oct 20 11:47:35 2017
New Revision: 316224
URL: http://llvm.org/viewvc/llvm-project?rev=316224&view=rev
Log:
GNU: do not read the FDE count if omitted
If there is no binary search table computed, the FDECount encoding is
DW_EH_PE_omit. Do not attempt to read the FDECoun
dcoughlin accepted this revision.
dcoughlin added a comment.
This revision is now accepted and ready to land.
Some nits inline, but looks good to me!
Comment at: lib/Analysis/BodyFarm.cpp:388
+ // reference.
+ for (unsigned int i = 2; i < D->getNumParams(); i++) {
+
-
Anastasia created this revision.
After the change of constant address space function scope variable in 6e34f0e
("[OpenCL] Emit function-scope variable in constant address space as static
variable", 2017-05-15) a bug has been introduced that triggered unreachable
during generation of samplers.
Author: hokein
Date: Fri Oct 20 10:54:53 2017
New Revision: 316221
URL: http://llvm.org/viewvc/llvm-project?rev=316221&view=rev
Log:
[clang-tidy] Add missing test files in r316090.
Added:
clang-tools-extra/trunk/test/clang-tidy/objc-arc-and-properties.m
clang-tools-extra/trunk/test/clang-
dcoughlin accepted this revision.
dcoughlin added a comment.
Thanks for fixing this!
https://reviews.llvm.org/D38922
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jordan_rose added a comment.
Thanks, Aaron!
Comment at: test/SemaCXX/warn-global-constructors.cpp:130
+
+namespace HasUnnamedBitfield {
+ struct HasUnnamedBitfield {
aaron.ballman wrote:
> Does this namespace require a name? If so, can it be named different th
dcoughlin added a comment.
What is the workflow where this is needed? Is it when an end-user is running a
build with assertions and can't provide a reproducer but can provide the
console output?
Does llvm_unreachable() guarantee that the string construction code is
completely removed from rele
JonasToth added a comment.
> I agree that we should not spend too much effort on making warnings from the
> compiler and tidy disjunct.
+1
There is an effort to treat clangs frontend warnings similar to clang-tidy
checks within clang-tidy. This would allow to manage the overlap as well.
Will t
jingham added a comment.
I can't see anything wrong with the SB API use here. I don't feel qualified to
comment on the most effective workflow for an analysis I've never had to do,
however.
https://reviews.llvm.org/D36347
___
cfe-commits mailing
clayborg added a comment.
If you want to run the script from the command line, then it is necessary. If
it is run from within LLDB it will just work. I like to have my LLDB python
scripts work both ways.
This might be better implemented as a new command that gets installed and can
be used with
zturner added a comment.
In https://reviews.llvm.org/D36347#902157, @clayborg wrote:
> Please do convert to python. Just know that you can use "lldb -P" to get the
> python path that is needed in order to do "import lldb" in the python script.
> So you can try doing a "import lldb", and if that
zaks.anna added inline comments.
Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:651-652
+ } else if (StoreSite->getLocation().getAs()) {
+os << "Reach the max loop limit.";
+os << " Assigning a conjured symbol";
+if (R->canPrintPretty()) {
--
boris added a comment.
Ping.
https://reviews.llvm.org/D37299
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
clayborg added a comment.
Please do convert to python. Just know that you can use "lldb -P" to get the
python path that is needed in order to do "import lldb" in the python script.
So you can try doing a "import lldb", and if that fails, catch the exception,
run "lldb -P", add that path to the
Eugene.Zelenko added a comment.
Same mistake could be made with new[] operator.
Comment at: docs/clang-tidy/checks/list.rst:10
android-cloexec-creat
+ android-cloexec-dup
android-cloexec-epoll-create
I think will be better to fix order of other check
aaron.ballman added inline comments.
Comment at:
docs/clang-tidy/checks/misc-misplaced-operator-in-strlen-in-alloc.rst:16
+void bad_malloc(char *str) {
+ char *c = (char*) malloc(strlen(str + 1));
+}
xazax.hun wrote:
> What if this code is intention
+jingham
On Fri, Oct 20, 2017 at 6:57 AM Don Hinton via Phabricator <
revi...@reviews.llvm.org> wrote:
> hintonda added a comment.
>
> In https://reviews.llvm.org/D36347#901885, @zturner wrote:
>
> > One possible reason for why this never got any traction is that
> `lldb-commits` wasn't added as
xazax.hun added a comment.
I agree that we should not spend too much effort on making warnings from the
compiler and tidy disjunct.
https://reviews.llvm.org/D33537
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bi
cierpuchaw added inline comments.
Comment at: unittests/Rename/RenameFunctionTest.cpp:232
+ std::string Expected = R"(
+ namespace na {
+ template T Y();
Shouldn't this be `namespace nb {`?
https://reviews.llvm.org/D39120
_
martong added a comment.
We might get false positives in case of certain substring operations.
Consider the case of copying a substring, pseudo code below:
const char * s = "abcdefg";
int offset = my_find('d', s);
// I want to copy "defg"
char *new_subststring = (char*) malloc(strlen(s +
xazax.hun added inline comments.
Comment at: clang-tidy/misc/MisplacedOperatorInStrlenInAllocCheck.cpp:30
+ Finder->addMatcher(
+ callExpr(callee(functionDecl(hasName("malloc"))),
+ hasArgument(0, anyOf(hasDescendant(BadUse), BadUse)))
Maybe i
hintonda added a comment.
In https://reviews.llvm.org/D36347#901885, @zturner wrote:
> One possible reason for why this never got any traction is that
> `lldb-commits` wasn't added as a subscriber. While it's true that the tagged
> people should have chimed in, having the whole commits list wi
martong added a comment.
Consider the use of a function pointer:
void* malloc(int);
int strlen(char*);
auto fp = malloc;
void bad_malloc(char *str) { char *c = (char *)fp(strlen(str + 1)); }
I think, the checker will not match in this case.
One might use allocation functions via a funct
ioeric accepted this revision.
ioeric added a comment.
This revision is now accepted and ready to land.
lgtm
https://reviews.llvm.org/D39120
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
hokein added inline comments.
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:227
+SourceLocation EndLoc = Expr->hasExplicitTemplateArgs()
+? Expr->getLAngleLoc().getLocWithOffset(-1)
+: Expr->getLocE
hokein updated this revision to Diff 119654.
hokein marked an inline comment as done.
hokein added a comment.
Test for `foo ()`.
https://reviews.llvm.org/D39120
Files:
lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
unittests/Rename/RenameFunctionTest.cpp
Index: unittests/Rename/RenameFu
lebedev.ri created this revision.
lebedev.ri added a project: clang.
As Mattias Eriksson has reported in PR35009, in C, for enums, the underlying
type should
be used when checking for the tautological comparison, unlike C++, where the
enumerator
values define the value range. So if not in CPlus
ioeric added inline comments.
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:227
+SourceLocation EndLoc = Expr->hasExplicitTemplateArgs()
+? Expr->getLAngleLoc().getLocWithOffset(-1)
+: Expr->getLocE
hokein added inline comments.
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:227
+SourceLocation EndLoc = Expr->hasExplicitTemplateArgs()
+? Expr->getLAngleLoc().getLocWithOffset(-1)
+: Expr->getLocE
baloghadamsoftware created this revision.
Herald added subscribers: mgorny, srhines.
A possible error is to write ``malloc(strlen(s+1))`` instead of
``malloc(strlen(s)+1)``. Unfortunately the former is also valid syntactically,
but allocates less memory by two bytes (if ``s`` is at least one cha
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316212: [clang-refactor] Add "-Inplace" option to the
commandline tool. (authored by hokein).
Repository:
rL LLVM
https://reviews.llvm.org/D39092
Files:
cfe/trunk/test/Refactor/tool-apply-replacemen
kosarev added a comment.
Thanks Hal.
Repository:
rL LLVM
https://reviews.llvm.org/D39083
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: hokein
Date: Fri Oct 20 05:37:16 2017
New Revision: 316212
URL: http://llvm.org/viewvc/llvm-project?rev=316212&view=rev
Log:
[clang-refactor] Add "-Inplace" option to the commandline tool.
Summary:
Change clang-refactor default behavior to print the new code after refactoring
(instead of
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316211: [CodeGen] Fix generation of TBAA info for
array-to-pointer conversions (authored by kosarev).
Changed prior to commit:
https://reviews.llvm.org/D39083?vs=119552&id=119646#toc
Repository:
rL L
Author: kosarev
Date: Fri Oct 20 05:35:17 2017
New Revision: 316211
URL: http://llvm.org/viewvc/llvm-project?rev=316211&view=rev
Log:
[CodeGen] Fix generation of TBAA info for array-to-pointer conversions
Resolves:
Fatal error: Offset not zero at the point of scalar access.
http://llvm.org/PR3499
ioeric added inline comments.
Comment at: lib/Tooling/Refactoring/Rename/USRLocFinder.cpp:227
+SourceLocation EndLoc = Expr->hasExplicitTemplateArgs()
+? Expr->getLAngleLoc().getLocWithOffset(-1)
+: Expr->getLocE
hokein created this revision.
Herald added a subscriber: klimek.
https://reviews.llvm.org/D39120
Files:
lib/Tooling/Refactoring/Rename/USRLocFinder.cpp
unittests/Rename/RenameFunctionTest.cpp
Index: unittests/Rename/RenameFunctionTest.cpp
xazax.hun added inline comments.
Comment at: lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:651-652
+ } else if (StoreSite->getLocation().getAs()) {
+os << "Reach the max loop limit.";
+os << " Assigning a conjured symbol";
+if (R->canPrintPretty()) {
--
joerg added a comment.
This is not about any operating system, but basic consistent behavior. either
do the canonicalisation or not. Doing it sometimes is just bogus. You've
effectively implemented -fcanonical-system-headers=sometimes.
Repository:
rL LLVM
https://reviews.llvm.org/D37954
martemyev created this revision.
martemyev added a project: clang.
The patch adds a new option '-fno-var-tracking-assignments' in the same group
(clang_ignored_f_Group) where the existing '-fno-var-tracking' resides.
https://reviews.llvm.org/D39116
Files:
include/clang/Driver/Options.td
In
On Fri, Oct 20, 2017 at 11:44 AM, Mikhail Artemyev via cfe-commits
wrote:
> Hi All,
>
> The attached patch adds a new option '-fno-var-tracking-assignments' in the
> same group (clang_ignored_f_Group) where the existing '-fno-var-tracking'
> resides.
It might be best to upload it to https://llvm.o
Hi All,
The attached patch adds a new option '-fno-var-tracking-assignments' in the
same group (clang_ignored_f_Group) where the existing '-fno-var-tracking'
resides.
Thanks,
Mikhail
clang-no-var-tracking-assignments.patch
Description: Binary data
___
dberris created this revision.
Herald added a subscriber: mgorny.
This is a work-in-progress change that attempts to allow us to build
and use the XRay runtime in Darwin. Current state:
- Assembler files are broken due to assumptions about ELFisms.
- Test infrastructure is laid out, but we aren't
materi added a comment.
In https://reviews.llvm.org/D38101#901733, @lebedev.ri wrote:
> In https://reviews.llvm.org/D38101#901709, @materi wrote:
>
> > Hi!
>
>
> Hi.
>
> > After this patch I started to see warnings:
>
> Thank you for the report!
>
> > e.c:8:23: warning: integer constant not in
85 matches
Mail list logo