[PATCH] D36390: Fix overloaded static functions in SemaCodeComplete

2017-10-25 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added a comment. one more ping... https://reviews.llvm.org/D36390 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39321: ARM: centralise SizeType, PtrDiffType, and IntPtrType

2017-10-25 Thread Saleem Abdulrasool via Phabricator via cfe-commits
compnerd created this revision. compnerd added a project: clang. Herald added subscribers: kristof.beyls, javed.absar, aemerson. Centralise the definitions of these compiler vended types to aid inspection to ensure that they are defined similarly. The one case that stands out is the Darwin case w

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 120360. hintonda added a comment. - Add diagtool option used to set arbitrary diagtool path. https://reviews.llvm.org/D36347 Files: utils/clangdiag.py Index: utils/clangdiag.py === --- /dev

[PATCH] D5767: Template Instantiation Observer + a few other templight-related changes

2017-10-25 Thread Ábel Sinkovics via Phabricator via cfe-commits
sabel83 updated this revision to Diff 120358. sabel83 marked 2 inline comments as done. https://reviews.llvm.org/D5767 Files: include/clang/Driver/CC1Options.td include/clang/Frontend/FrontendActions.h include/clang/Frontend/FrontendOptions.h include/clang/FrontendTool/Utils.h include/c

Re: r316046 - Basic: fix __{,U}INTPTR_TYPE__ on ARM

2017-10-25 Thread Saleem Abdulrasool via cfe-commits
On Fri, Oct 20, 2017 at 11:56 AM, Friedman, Eli wrote: > 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}

[PATCH] D39317: Use -fuse-init-array if no gcc installation is found.

2017-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. Herald added a subscriber: srhines. clang currently uses .init_array instead of .ctors on Linux if it detects gcc 4.7+. Make it so that it also uses .init_array if no gcc installation is found at all – if there's no old gcc, there's nothing we need to be compatible

[PATCH] D24933: Enable configuration files in clang

2017-10-25 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Driver/Driver.cpp:661 + + // If not found, try searching the directory where executable resides. + FilePath.clear(); hfinkel wrote: > Why not just add this directory to the end of the list of directories? (by which

[PATCH] D24933: Enable configuration files in clang

2017-10-25 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added inline comments. Comment at: lib/Driver/Driver.cpp:630 + for (const char *Dir : Directories) { +assert(Dir); +FilePath.clear(); assert(Dir && "Directory path should not be null"); Comment at: lib/Driver/Driver.cpp:637 +

[PATCH] D39312: [LSan] Enable -fsanitize=leak for PPC64 Linux.

2017-10-25 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316636: [LSan] Enable -fsanitize=leak for PPC64 Linux. (authored by alekseyshl). Repository: rL LLVM https://reviews.llvm.org/D39312 Files: cfe/trunk/lib/Driver/ToolChains/Linux.cpp cfe/trunk/test

r316636 - [LSan] Enable -fsanitize=leak for PPC64 Linux.

2017-10-25 Thread Alex Shlyapnikov via cfe-commits
Author: alekseyshl Date: Wed Oct 25 20:09:53 2017 New Revision: 316636 URL: http://llvm.org/viewvc/llvm-project?rev=316636&view=rev Log: [LSan] Enable -fsanitize=leak for PPC64 Linux. Summary: . Reviewers: eugenis Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D39312

Buildbot numbers for the last week of 10/15/2017 - 10/21/2017

2017-10-25 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the last week of 10/15/2017 - 10/21/2017. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from gre

Buildbot numbers for the week of 10/8/2017 - 10/14/2017

2017-10-25 Thread Galina Kistanova via cfe-commits
Hello everyone, Below are some buildbot numbers for the week of 10/8/2017 - 10/14/2017. Please see the same data in attached csv files: The longest time each builder was red during the week; "Status change ratio" by active builder (percent of builds that changed the builder status from greed to

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. I can confirm that with this patch the (large) regex that used to cause a stack overflow does not any more. https://reviews.llvm.org/D39308 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/c

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Marshall Clow via Phabricator via cfe-commits
mclow.lists added a comment. A couple of notes. - This change means that now requires C++11 (the new `__push` function w/ the varargs). I don't know how important that is; but I'm pretty sure libc++ currently provides `` in C++03 mode. - This is an ABI change; existing code that was compiled

[PATCH] D39166: [NFC] Add some assertions to placate my paranoia about sharing a variant bit across FunctionDecl and CXXDeductionGuideDecl - should I do this?

2017-10-25 Thread Faisal Vali via Phabricator via cfe-commits
faisalv updated this revision to Diff 120346. faisalv marked 4 inline comments as done. faisalv added a comment. Incorporated Aaron's feedback (although not sure if I caugh tall the white space issues). Additionally, I was thinking of reordering the bits - and using UseSEHTry (this bit really m

[PATCH] D39310: [CGBlocks] Improve line info in backtraces containing *_helper_block

2017-10-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1651 StartFunction(FD, C.VoidTy, Fn, FI, args); - // Create a scope with an artificial location for the body of this function. - auto AL = ApplyDebugLocation::CreateArtificial(*this); + ApplyDebugLocation NL{*t

r316632 - [Analyzer] [Tests] Consistently use exit codes. Use code=42 to signify different results

2017-10-25 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Oct 25 18:13:22 2017 New Revision: 316632 URL: http://llvm.org/viewvc/llvm-project?rev=316632&view=rev Log: [Analyzer] [Tests] Consistently use exit codes. Use code=42 to signify different results Modified: cfe/trunk/utils/analyzer/SATestBuild.py cfe/tr

[PATCH] D39310: [CGBlocks] Improve line info in backtraces containing *_helper_block

2017-10-25 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere added inline comments. Comment at: lib/CodeGen/CGBlocks.cpp:1651 StartFunction(FD, C.VoidTy, Fn, FI, args); - // Create a scope with an artificial location for the body of this function. - auto AL = ApplyDebugLocation::CreateArtificial(*this); + ApplyDebugLocat

r316631 - Allow StmtPrinter to supress implicit 'this' and 'self' base expressions

2017-10-25 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Oct 25 17:56:54 2017 New Revision: 316631 URL: http://llvm.org/viewvc/llvm-project?rev=316631&view=rev Log: Allow StmtPrinter to supress implicit 'this' and 'self' base expressions This will be useful for certain refactoring actions. rdar://34202062 Modified: cfe/

[PATCH] D39312: [LSan] Enable -fsanitize=leak for PPC64 Linux.

2017-10-25 Thread Aleksey Shlyapnikov via Phabricator via cfe-commits
alekseyshl created this revision. . https://reviews.llvm.org/D39312 Files: lib/Driver/ToolChains/Linux.cpp test/Driver/fsanitize.c Index: test/Driver/fsanitize.c === --- test/Driver/fsanitize.c +++ test/Driver/fsanitize.c @@

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, I think this is looking much better. A couple of bits of the interface could be yet simpler :-) Comment at: include/clang/Tooling/Refactoring/Extract/ExtractFunction.h:21 +/// then called from the place where the original code was. +class Extr

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-25 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. In https://reviews.llvm.org/D39220#907160, @george.karpenkov wrote: > @dcoughlin OK, I'll commit that [I assuming not doing the review would be > fine here] Yes, thanks! Repository: rL LLVM https://reviews.llvm.org/D39220 _

[PATCH] D39310: [CGBlocks] Improve line info in backtraces containing *_helper_block

2017-10-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk updated this revision to Diff 120342. vsk added a comment. - Simplify the checks by not hardcoding a line number. https://reviews.llvm.org/D39310 Files: lib/CodeGen/CGBlocks.cpp test/CodeGenObjC/debug-info-blocks.m Index: test/CodeGenObjC/debug-info-blocks.m ==

[PATCH] D39310: [CGBlocks] Improve line info in backtraces containing *_helper_block

2017-10-25 Thread Vedant Kumar via Phabricator via cfe-commits
vsk created this revision. Instead of only setting a non-zero debug location on the return instruction in *_helper_block functions, set a proper location on all instructions within these functions. Pick the start location of the block literal expr for maximum clarity. The debugger does not step i

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Jim Ingham via Phabricator via cfe-commits
jingham added a comment. Ack, my bad. I should remember not to rely on my memory... I thought at one point I was going to do it that way, then got annoyed I'd have to have "BreakpointDisableByName" etc... So apparently I made: SBTarget.FindBreakpointByName that takes a name & an SBBreakpoint

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Don Hinton via Phabricator via cfe-commits
hintonda added inline comments. Comment at: utils/clangdiag.py:83 +# Remove all diag breakpoints. +bkpts = lldb.SBBreakpointList(target) +target.FindBreakpointsByName("clang::Diagnostic", bkpts) Can't use iterator because it gets invalidated and not a

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 120340. hintonda edited the summary of this revision. hintonda added a comment. Herald added a subscriber: ilya-biryukov. - Addressed comments. https://reviews.llvm.org/D36347 Files: utils/clangdiag.py Index: utils/clangdiag.py =

[PATCH] D38774: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.

2017-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai updated this revision to Diff 120337. vsapsai added a comment. - Address rjmccall review comment about nested arrays. https://reviews.llvm.org/D38774 Files: clang/lib/CodeGen/CGObjCMac.cpp clang/test/CodeGenObjC/ivar-layout-flexible-array.m Index: clang/test/CodeGenObjC/ivar-layou

[PATCH] D38774: [CodeGen] Add support for IncompleteArrayType in Obj-C ivars.

2017-10-25 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added inline comments. Comment at: clang/lib/CodeGen/CGObjCMac.cpp:5095 +fieldType = fieldType->getAsArrayTypeUnsafe()->getElementType(); + } + rjmccall wrote: > vsapsai wrote: > > rjmccall wrote: > > > You can't just use isa<> here; there can be typ

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. The updated patch introduces some redundancy between the `RefactoringAction` and the descriptor interface. I will address this in a follow-up patch. Repository: rL LLVM https://reviews.llvm.org/D38985 ___ cfe-commits ma

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 120336. arphaman added a comment. Remove unused function Repository: rL LLVM https://reviews.llvm.org/D38985 Files: include/clang/Tooling/Refactoring/Extract/ExtractFunction.h include/clang/Tooling/Refactoring/RefactoringActionRegistry.def include

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 120335. arphaman added a comment. - Refactoring operations like ExtractFunction should be declared in headers and should contain the initiation checks. - Refactoring actions can now be all created in one "engine" file. - A new descriptor interface describes

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. In https://reviews.llvm.org/D38985#906893, @sammccall wrote: > Thanks, this looks a bunch simpler. > > I have a question about the direction here: AFAICS there's various efforts in > the refactoring infrastructure to allow consumers of the Refactor libs (e.g. > clang-r

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 120334. timshen added a comment. Add an assertion to __push. https://reviews.llvm.org/D39308 Files: libcxx/include/regex Index: libcxx/include/regex === --- libcxx/include/regex +++ libcxx/i

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Build abstraction on regex's allocation This fixes a fuzzer crasher from a huge input (provided by Marshall), which seems to be a stackoverflow during destruction. However, I can't reproduce Marsh

[PATCH] D34018: Support __float128 on NetBSD libstdc++ x86/x86_64

2017-10-25 Thread Kamil Rytarowski via Phabricator via cfe-commits
krytarowski planned changes to this revision. krytarowski added a comment. Rescheduled for future. Maybe I will need to check and improve how good is this i386 __float128 support. Repository: rL LLVM https://reviews.llvm.org/D34018 ___ cfe-commi

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Jim Ingham via Phabricator via cfe-commits
jingham added a comment. Note, BTW, Enrico also added a form of the command add that allows you to use a Python class to wrap the callable. That was in early 2015 so it's probably safe to use as well by now. That's even more convenient, and obviates the need for globals at all. One instance

r316621 - Handle PragmaDebug in PPChainedCallbacks

2017-10-25 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Oct 25 15:01:23 2017 New Revision: 316621 URL: http://llvm.org/viewvc/llvm-project?rev=316621&view=rev Log: Handle PragmaDebug in PPChainedCallbacks The test is in clang-tools-extra/test/pp-trace Modified: cfe/trunk/include/clang/Lex/PPCallbacks.h Modified: cfe/tr

[clang-tools-extra] r316621 - Handle PragmaDebug in PPChainedCallbacks

2017-10-25 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Oct 25 15:01:23 2017 New Revision: 316621 URL: http://llvm.org/viewvc/llvm-project?rev=316621&view=rev Log: Handle PragmaDebug in PPChainedCallbacks The test is in clang-tools-extra/test/pp-trace Modified: clang-tools-extra/trunk/test/pp-trace/pp-trace-pragma-gener

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. This revision is now accepted and ready to land. In general, "I don't see any way to prevent $slow_thing" just means the patch can't move ahead. But in this case, this looks like fairly small overhead for a worst-case input, so this won't be

r316618 - [Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests

2017-10-25 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Oct 25 14:49:46 2017 New Revision: 316618 URL: http://llvm.org/viewvc/llvm-project?rev=316618&view=rev Log: [Analyzer] [Tests] Do not discard output from CmpRuns.py when running integration tests Contrary to the deleted comment, in most cases CmpRuns.py produce

r316617 - [Analyzer] Give more descriptive name to BdyFrm field.

2017-10-25 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Oct 25 14:49:41 2017 New Revision: 316617 URL: http://llvm.org/viewvc/llvm-project?rev=316617&view=rev Log: [Analyzer] Give more descriptive name to BdyFrm field. Discussion at: https://reviews.llvm.org/D39220 Modified: cfe/trunk/include/clang/Analysis/Anal

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-25 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added a comment. @dcoughlin OK, I'll commit that [I assuming not doing the review would be fine here] Repository: rL LLVM https://reviews.llvm.org/D39220 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Greg Clayton via Phabricator via cfe-commits
clayborg added inline comments. Comment at: utils/clangdiag.py:62 + +def enable(debugger, args): +# Always disable existing breakpoints Pass exe_ctx or target into this instead of the debugger (see Jim's comment on execution contexts below. ===

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Jim Ingham via Phabricator via cfe-commits
jingham added a comment. Yes definitely use names for your breakpoints. It makes them easier to handle. Note starting a month or two ago you can set names to not get deleted except by an explicit gesture. That hasn't shown up in releases yet, but once you can rely on its being there, you can

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 120316. lebedev.ri added a comment. Add `Diags.isIgnored()` early return + move `C++11` early return earlier too. At least partially should help avoid the penalty of `findMacroSpelling()` I don't think i see any way to avoid `findMacroSpelling()` :/ Repos

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Jim Ingham via Phabricator via cfe-commits
jingham requested changes to this revision. jingham added a comment. This revision now requires changes to proceed. Use the form of the command that gets an SBExecutionContext, then you can avoid having to cache the target at all. Comment at: utils/clangdiag.py:98-100 +def the

r316611 - [CUDA] Print an error if you try to compile with < sm_30 on CUDA 9.

2017-10-25 Thread Justin Lebar via cfe-commits
Author: jlebar Date: Wed Oct 25 14:32:06 2017 New Revision: 316611 URL: http://llvm.org/viewvc/llvm-project?rev=316611&view=rev Log: [CUDA] Print an error if you try to compile with < sm_30 on CUDA 9. Summary: CUDA 9's minimum sm is sm_30. Ideally we should also make sm_30 the default when compi

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Don Hinton via Phabricator via cfe-commits
hintonda added a comment. Thanks for the quick feedback. I'll make all you suggested changes, but need to think a little more about `diagtool`. Comment at: utils/clangdiag.py:75-78 +diagtool = os.path.join(exe.GetDirectory(), 'diagtool') +if not os.path.exists(diagtoo

[PATCH] D39305: Simplify codegen and debug info generation for block context parameters.

2017-10-25 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl created this revision. The exisiting code goes out of its way to put block parameters into an alloca at -O0 only, but then describes the function argument (instead of the alloca) with a dbg.declare and the value loaded from the alloca with a dbg.value. Describing a function argument wit

[PATCH] D36347: New lldb python module for adding diagnostic breakpoints

2017-10-25 Thread Greg Clayton via Phabricator via cfe-commits
clayborg added a comment. Looks good. A little bit of cleanup. Let me know what you think of the comments. Comment at: utils/clangdiag.py:17 +import os +from subprocess import check_output as qx; + I would rather just do: ``` import subprocess ``` Then later

[PATCH] D38819: [libunwind] Add support for dwarf unwinding on windows on x86_64

2017-10-25 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added inline comments. Comment at: src/UnwindRegistersRestore.S:72 + movq 56(%rcx), %rax # rax holds new stack pointer + subq $16, %rax + movq %rax, 56(%rcx) mstorsjo wrote: > compnerd wrote: > > Hmm, why is this `$16`? The `$rsp` was adjusted by

[PATCH] D36836: [clang-tidy] Implement readability-function-cognitive-complexity check

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp:102 +const unsigned short Nesting; /// How deeply nested is Loc located? +const Criteria C : 3; /// The criteria of the increment + lebede

[PATCH] D36347: Add new script to launch lldb and set breakpoints for diagnostics all diagnostics seen.

2017-10-25 Thread Don Hinton via Phabricator via cfe-commits
hintonda updated this revision to Diff 120308. hintonda added a comment. Reimplement at a python module. https://reviews.llvm.org/D36347 Files: utils/clangdiag.py Index: utils/clangdiag.py === --- /dev/null +++ utils/clangdiag.p

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. > Hm, that's a lot of overhead. Granted, it's a synthetic benchmark, but I > think it'd be good to try this on some real codebase to make sure it really > is negligible overhead in real-world scenarios. Hm wait, i'm comparing apples and oranges here, my local build a

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Saleem Abdulrasool via cfe-commits
Sure, I’ll add a release note. The type for the -fno-short-wchar shouldn’t have changed on ARM. That sounds like a mistake. We could just promote the -fsigned-wchar to a driver level flag. Every target seems to use signed int, not unsigned int for wchar_t. On Wed, Oct 25, 2017 at 1:32 PM Fried

[PATCH] D38430: Enable -pie and --enable-new-dtags by default on Android.

2017-10-25 Thread Evgenii Stepanov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316606: Enable -pie and --enable-new-dtags by default on Android. (authored by eugenis). Changed prior to commit: https://reviews.llvm.org/D38430?vs=117229&id=120306#toc Repository: rL LLVM https://

r316606 - Enable -pie and --enable-new-dtags by default on Android.

2017-10-25 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Wed Oct 25 13:39:22 2017 New Revision: 316606 URL: http://llvm.org/viewvc/llvm-project?rev=316606&view=rev Log: Enable -pie and --enable-new-dtags by default on Android. Summary: Also enable -no-pie on Gnu toolchain (previously available on Darwin only). Non-PIE executables

Re: [PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Nico Weber via cfe-commits
Hm, that's a lot of overhead. Granted, it's a synthetic benchmark, but I think it'd be good to try this on some real codebase to make sure it really is negligible overhead in real-world scenarios. On Wed, Oct 25, 2017 at 3:09 PM, Roman Lebedev via Phabricator via cfe-commits wrote: > lebedev.ri

[PATCH] D38688: [clang-tidy] Misc redundant expressions checker updated for macros

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/RedundantExpressionCheck.cpp:89 cast(Right)->getValue(); + case Stmt::IntegerLiteralClass: { I would remove the formatting changes from this function. Comment at: c

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-25 Thread Devin Coughlin via Phabricator via cfe-commits
dcoughlin added a comment. I agree with Alexander here. The LLVM naming convention is not going to change and we should err on the side of using descriptive names. How about "FunctionBodyFarm"? Repository: rL LLVM https://reviews.llvm.org/D39220 __

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Friedman, Eli via cfe-commits
On 10/25/2017 12:49 PM, Reid Kleckner wrote: On Wed, Oct 25, 2017 at 12:14 PM, Friedman, Eli mailto:efrie...@codeaurora.org>> wrote: Maybe we should just ignore -fno-short-wchar, instead?  I think that's what gcc and released versions of clang do (that means -fno-short-wchar doesn't

[PATCH] D39217: [libclang, bindings]: add spelling location

2017-10-25 Thread Masud Rahman via Phabricator via cfe-commits
frutiger added a comment. It looks like the `my_var:2:1` refers to the result from `clang_getCursorReferenced`: https://github.com/llvm-mirror/clang/blob/d454549fce04dfedda6cc2825b66efca94effe3f/tools/c-index-test/c-index-test.c#L709-L711. I'm not sure what a referenced cursor is in this conte

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 120305. lebedev.ri added a comment. Rebased now that https://reviews.llvm.org/D39301 has landed. Repository: rL LLVM https://reviews.llvm.org/D38954 Files: docs/ReleaseNotes.rst lib/Sema/Sema.cpp test/SemaCXX/Inputs/warn-zero-nullptr.h test/Se

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316605: Ignore implicity casts for zero-as-null-pointer-constant warning (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D39301?vs=120289&id=120301#toc Repository: rL LLVM

r316605 - Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via cfe-commits
Author: erichkeane Date: Wed Oct 25 13:23:13 2017 New Revision: 316605 URL: http://llvm.org/viewvc/llvm-project?rev=316605&view=rev Log: Ignore implicity casts for zero-as-null-pointer-constant warning The repro in https://bugs.llvm.org/show_bug.cgi?id=34362 caused the left nullptr to be cast to

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. In https://reviews.llvm.org/D39284#906899, @aaron.ballman wrote: > We typically diagnose vendor extensions to the language, and I think we > should apply that consistently. Otherwise, your code will compile fine in > Clang with warning levels cranked all the way up and

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Reid Kleckner via cfe-commits
On Wed, Oct 25, 2017 at 12:14 PM, Friedman, Eli wrote: > Maybe we should just ignore -fno-short-wchar, instead? I think that's > what gcc and released versions of clang do (that means -fno-short-wchar > doesn't do anything for Windows targets, but that's probably fine). > No, the intention of t

[PATCH] D39121: [clang-tidy] Misplaced Operator in Strlen in Alloc

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm still a bit concerned about how to silence this diagnostic if the code is actually correct. Would it make sense to diagnose `malloc(strlen(s + 1))` but silence the diagnostic if the argument to `strlen()` is explicitly parenthesized? That means a user could si

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray updated this revision to Diff 120295. lichray added a comment. One more test case https://reviews.llvm.org/D39284 Files: include/clang/Sema/DeclSpec.h lib/Parse/ParseExprCXX.cpp lib/Sema/SemaDeclCXX.cpp test/Parser/cxx2a-decomposition.cpp test/SemaCXX/cxx2a-decomposition.cpp

[PATCH] D39166: [NFC] Add some assertions to placate my paranoia about sharing a variant bit across FunctionDecl and CXXDeductionGuideDecl - should I do this?

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'll let Richard comment on whether this pattern is reasonable or not, but I have some very minor nits in the meantime. Comment at: include/clang/AST/Decl.h:1683 // Since a Deduction Guide [C++17] will never have a body, we can share the - //

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Friedman, Eli via cfe-commits
On 10/25/2017 11:54 AM, Reid Kleckner wrote: On Wed, Oct 25, 2017 at 10:56 AM, Friedman, Eli mailto:efrie...@codeaurora.org>> wrote: On 10/6/2017 4:09 PM, Saleem Abdulrasool via cfe-commits wrote: Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://llvm

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D38954#906900, @thakis wrote: > Can you build some large-ish codebase (say, LLVM) with and without this patch > and make sure that this doesn't measurably add to build perf? (With the > warning turned on, obviously.) > > Other than that, t

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39301#906911, @thakis wrote: > Awesome, thanks much! Like lebedev.ri says, adding a test for the "Parens" > part would be good. I agree. I should have been more explicit with my LGTM, but I presumed you knew to add the tests already.

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Reid Kleckner via cfe-commits
On Wed, Oct 25, 2017 at 10:56 AM, Friedman, Eli wrote: > On 10/6/2017 4:09 PM, Saleem Abdulrasool via cfe-commits wrote: > >> Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp >> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Too >> lChains/Clang.cpp?rev=315126&r1=315125&r2=31512

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. They've got me presenting in the next meeting, but i'll add said test and commit after. Thanks for the reviews guys! https://reviews.llvm.org/D39301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.l

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis accepted this revision. thakis added a comment. Awesome, thanks much! Like lebedev.ri says, adding a test for the "Parens" part would be good. https://reviews.llvm.org/D39301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Can you build some large-ish codebase (say, LLVM) with and without this patch and make sure that this doesn't measurably add to build perf? (With the warning turned on, obviously.) Other than that, this looks good to me. Comment at: test/SemaCXX/warn-

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! https://reviews.llvm.org/D39301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39284#906889, @lichray wrote: > In https://reviews.llvm.org/D39284#906860, @aaron.ballman wrote: > > > I'm aware, but I was unaware that we've accepted this functionality in > > C++2a yet within WG21. Did we vote this in and I simply di

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/Sema.cpp:441 return; - if (E->getType()->isNullPtrType()) + if (E->IgnoreImpCasts()->getType()->isNullPtrType()) return; erichkeane wrote: > aaron.ballman wrote: > > Do we also want to ignore pare

[PATCH] D39220: [Analyzer] Store BodyFarm in std::unique_ptr

2017-10-25 Thread George Karpenkov via Phabricator via cfe-commits
george.karpenkov added inline comments. Comment at: include/clang/Analysis/AnalysisDeclContext.h:424 /// methods during the analysis. - BodyFarm *BdyFrm = nullptr; + std::unique_ptr BdyFrm; alexfh wrote: > george.karpenkov wrote: > > alexfh wrote: > > > Bd

[PATCH] D38985: [refactor] Add support for editor commands that connect IDEs/editors to the refactoring actions

2017-10-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks, this looks a bunch simpler. I have a question about the direction here: AFAICS there's various efforts in the refactoring infrastructure to allow consumers of the Refactor libs (e.g. clang-refactor, clangd, XCode?) to operate without knowing the details of the

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120289. erichkeane added a comment. Lets ignore parens too! https://reviews.llvm.org/D39301 Files: lib/Sema/Sema.cpp test/SemaCXX/warn-zero-nullptr.cpp Index: lib/Sema/Sema.cpp === ---

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/Sema.cpp:441 return; - if (E->getType()->isNullPtrType()) + if (E->IgnoreImpCasts()->getType()->isNullPtrType()) return; aaron.ballman wrote: > Do we also want to ignore parens here as well with

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. In https://reviews.llvm.org/D39284#906860, @aaron.ballman wrote: > I'm aware, but I was unaware that we've accepted this functionality in C++2a > yet within WG21. Did we vote this in and I simply didn't remember it? No. In the first line of the Summary I said this has

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/Sema.cpp:441 return; - if (E->getType()->isNullPtrType()) + if (E->IgnoreImpCasts()->getType()->isNullPtrType()) return; Do we also want to ignore parens here as well with `Expr::IgnoreParenIm

[PATCH] D38796: [CodeGen] EmitPointerWithAlignment() to generate TBAA info along with LValue base info

2017-10-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. I think probably the best solution is to track may-alias-ness explicitly in the TBAAAccessInfo instead of relying in the frontend on being able to distinguish things in the LLVM metadata. Repository: rL LLVM https://reviews.llvm.org/D38796 __

[PATCH] D39138: [CodeGen] Generate TBAA info for 'this' pointers

2017-10-25 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D39138#906623, @kosarev wrote: > Hmm, according to our research such loads constitute about 18% of all loads > under ##-O -Xclang -disable-llvm-passes## on the LLVM code base. I wonder, do > you think it would be nice to not generate them at

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 120288. erichkeane marked an inline comment as done. erichkeane added a comment. Response to Roman's comment. https://reviews.llvm.org/D39301 Files: lib/Sema/Sema.cpp test/SemaCXX/warn-zero-nullptr.cpp Index: lib/Sema/Sema.cpp =

[PATCH] D38824: [X86] Synchronize the existing CPU predefined macros with the cases that gcc defines them

2017-10-25 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added a comment. Ping https://reviews.llvm.org/D38824 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/SemaCXX/warn-zero-nullptr.cpp:29 + +// Shouldn't warn. +struct pr34362 { operator int*() { return nullptr; } }; Maybe wrap into a `namespace PR34362 {}` https://reviews.llvm.org/D39301 __

[PATCH] D39301: Ignore implicity casts for zero-as-null-pointer-constant warning

2017-10-25 Thread Erich Keane via Phabricator via cfe-commits
erichkeane created this revision. The repro in https://bugs.llvm.org/show_bug.cgi?id=34362 caused the left nullptr to be cast to a int* implicitly, which resulted diagnosing this falsely. https://reviews.llvm.org/D39301 Files: lib/Sema/Sema.cpp test/SemaCXX/warn-zero-nullptr.cpp Index: li

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In https://reviews.llvm.org/D39284#906800, @lichray wrote: > In https://reviews.llvm.org/D39284#906450, @aaron.ballman wrote: > > > I'm not opposed to the functionality, but this isn't a part of C++2a > > either; I think we should be diagnosing this code with a war

[PATCH] D38954: [Sema] -Wzero-as-null-pointer-constant: don't warn for system macros other than NULL.

2017-10-25 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 120285. lebedev.ri added a comment. - Rebased - Handle `-Wsystem-headers` properly, as per irc disscussion. It was suggested that `findMacroSpelling()` might be slow, and `isNullPointerConstant()` should be used, but i'm not sure any of the `NullPointerC

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-25 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews added inline comments. Comment at: lib/Sema/SemaType.cpp:3269-3273 + bool IsMain = false; + if (D.getIdentifier() && D.getIdentifier()->isStr("main") && + S.CurContext->getRedeclContext()->isTranslationUnit() && + !S.getLangOpts().Freestanding) +IsMain =

[PATCH] D39210: Add default calling convention support for regcall.

2017-10-25 Thread Elizabeth Andrews via Phabricator via cfe-commits
eandrews updated this revision to Diff 120284. eandrews added a comment. Updated patch to set default calling convention for main() in CheckMain() https://reviews.llvm.org/D39210 Files: include/clang/Basic/LangOptions.h include/clang/Driver/CC1Options.td include/clang/Driver/CLCompatOptio

r316599 - CodeGen: fix PPC Darwin variadics

2017-10-25 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Oct 25 10:56:50 2017 New Revision: 316599 URL: http://llvm.org/viewvc/llvm-project?rev=316599&view=rev Log: CodeGen: fix PPC Darwin variadics Darwin uses char * for the variadic list type (va_list). We use the PPC SVR4 ABI for PPC, which uses a structure type for the v

Re: r315126 - Driver: hoist the `wchar_t` handling to the driver

2017-10-25 Thread Friedman, Eli via cfe-commits
On 10/6/2017 4:09 PM, Saleem Abdulrasool via cfe-commits wrote: Modified: cfe/trunk/lib/Driver/ToolChains/Clang.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/Clang.cpp?rev=315126&r1=315125&r2=315126&view=diff

[PATCH] D39284: [c++2a] Decomposed _condition_

2017-10-25 Thread Zhihao Yuan via Phabricator via cfe-commits
lichray added a comment. In https://reviews.llvm.org/D39284#906450, @aaron.ballman wrote: > I'm not opposed to the functionality, but this isn't a part of C++2a either; > I think we should be diagnosing this code with a warning so users don't > expect it to work on every compiler. C++2a the s

  1   2   >