[libcxx] r299625 - [libc++] Respect Windows Store app CRT restrictions

2017-04-05 Thread Shoaib Meenai via cfe-commits
Author: smeenai Date: Wed Apr 5 23:47:49 2017 New Revision: 299625 URL: http://llvm.org/viewvc/llvm-project?rev=299625=rev Log: [libc++] Respect Windows Store app CRT restrictions Some CRT APIs are unavailable for Windows Store apps [1]. Detect when we're targeting the Windows Store and don't

[PATCH] D31737: [libc++] Respect Windows Store app CRT restrictions

2017-04-05 Thread Shoaib Meenai via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299625: [libc++] Respect Windows Store app CRT restrictions (authored by smeenai). Changed prior to commit: https://reviews.llvm.org/D31737?vs=94308=94317#toc Repository: rL LLVM

Re: [PATCH] [PPC64]: Add support for Swift calling convention

2017-04-05 Thread Andrew Jeffery via cfe-commits
Ping - Is anyone happy to review or apply the patch? If I've missed some process I should have followed, please let me know! Andrew On Wed, 2017-03-22 at 22:30 +1030, Andrew Jeffery wrote: > Signed-off-by: Andrew Jeffery > --- >  lib/Basic/Targets.cpp  | 11 +++ >  

[PATCH] D31667: [Sema] Extend GetSignedVectorType to deal with non ExtVector types

2017-04-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:9736 + } + + if (TypeSize == Context.getTypeSize(Context.LongLongTy)) This isn't particularly urgent, but can we use ASTContext ::getIntTypeForBitwidth here rather than calling getVectorType or

[libcxx] r299607 - Fix remote test execution in lit

2017-04-05 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Wed Apr 5 20:14:57 2017 New Revision: 299607 URL: http://llvm.org/viewvc/llvm-project?rev=299607=rev Log: Fix remote test execution in lit Can be used as such: $ python /path/to/lit.py -sv /path/to/llvm/build/projects/libcxx/test/ \

[libcxx] r299606 - Use alternate string layout for ARMv7k

2017-04-05 Thread Mehdi Amini via cfe-commits
Author: mehdi_amini Date: Wed Apr 5 20:10:22 2017 New Revision: 299606 URL: http://llvm.org/viewvc/llvm-project?rev=299606=rev Log: Use alternate string layout for ARMv7k Modified: libcxx/trunk/include/__config Modified: libcxx/trunk/include/__config URL:

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2017-04-05 Thread Akira Hatanaka via Phabricator via cfe-commits
ahatanak added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8024 + bool RHSNatVec = RHS.get()->IgnoreImpCasts()->getType()->isVectorType(); + + if (LHSNatVec ^ RHSNatVec) { I think "!=" is easier to understand than "^" here. Comment

[PATCH] D31737: [libc++] Respect Windows Store app CRT restrictions

2017-04-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. Some CRT APIs are unavailable for Windows Store apps [1]. Detect when we're targeting the Windows Store and don't try to refer to non-existent CRT functions in that case. (This would otherwise lead to a compile error when using the libc++ headers and compiling for

[PATCH] D31736: Implement _interlockedbittestandset as a builtin

2017-04-05 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:570 +llvm::AtomicOrdering::SequentiallyConsistent); +llvm::Value *Shifted = Builder.CreateLShr(RMWI, Bit); +llvm::Value *Truncated = Can you comment that this shifts the relevant

r299603 - [Sema] Update CheckOverload docs

2017-04-05 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Apr 5 19:23:31 2017 New Revision: 299603 URL: http://llvm.org/viewvc/llvm-project?rev=299603=rev Log: [Sema] Update CheckOverload docs - Replace documented return values (true/false) with what's actually returned - Doxygenify the comment - Reflow said comment to 80 cols

r299601 - Simplify. NFC.

2017-04-05 Thread George Burgess IV via cfe-commits
Author: gbiv Date: Wed Apr 5 19:08:35 2017 New Revision: 299601 URL: http://llvm.org/viewvc/llvm-project?rev=299601=rev Log: Simplify. NFC. Two simplifications: - We check `!Previous.empty()` above and only use `Previous` in const contexts after that check, so the `!Previous.empty()` check

[PATCH] D31736: Implement _interlockedbittestandset as a builtin

2017-04-05 Thread Hans Wennborg via Phabricator via cfe-commits
hans created this revision. It's used by MS headers in VS 2017 without including intrin.h, so we can't implement it in the header anymore. https://reviews.llvm.org/D31736 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp lib/Headers/intrin.h

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: docs/LanguageExtensions.rst:2380 + +The ``__declspec`` style syntax is also supported. A single push directive +accepts only one attribute regardless of the syntax used. Might as well add an example for __declspec

LLVM buildmaster will be updated and restarted tonight

2017-04-05 Thread Galina Kistanova via cfe-commits
Hello everyone, LLVM buildmaster will be updated and restarted after 7 PM Pacific time today. Thanks Galina ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxx] r299599 - [CMake][libcxx] Use builtins rather than gcc_s when compiler-rt is requested

2017-04-05 Thread Petr Hosek via cfe-commits
Author: phosek Date: Wed Apr 5 17:53:05 2017 New Revision: 299599 URL: http://llvm.org/viewvc/llvm-project?rev=299599=rev Log: [CMake][libcxx] Use builtins rather than gcc_s when compiler-rt is requested When compiler-rt is requested, we should attempt to link compiler-rt builtins library

r299597 - [Driver] Print a newline when invoking `-print-resource-dir`

2017-04-05 Thread Meador Inge via cfe-commits
Author: meadori Date: Wed Apr 5 17:27:20 2017 New Revision: 299597 URL: http://llvm.org/viewvc/llvm-project?rev=299597=rev Log: [Driver] Print a newline when invoking `-print-resource-dir` The commit yesterday (r299473) to add the `-print-resource-dir` option was supposed to emit a newline

[PATCH] D29622: Add a batch query and replace tool based on AST matchers.

2017-04-05 Thread Julian Bangert via Phabricator via cfe-commits
jbangert updated this revision to Diff 94297. jbangert added a comment. Fix command line tool. https://reviews.llvm.org/D29622 Files: clang-query/CMakeLists.txt clang-query/QueryReplace.cpp clang-query/QueryReplace.h clang-query/replace-tool/CMakeLists.txt

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added inline comments. Comment at: lib/Sema/SemaDecl.cpp:1496 return false; + // 'static operator' functions are defined in headers; don't warn. + if (FD->isOverloadedOperator() && rsmith wrote: > Why? Defining a static operator

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 94294. v.g.vassilev added a comment. Attach the right diff. https://reviews.llvm.org/D29877 Files: lib/Sema/Sema.cpp lib/Sema/SemaDecl.cpp test/SemaCXX/warn-unused-filescoped.cpp Index: test/SemaCXX/warn-unused-filescoped.cpp

[PATCH] D29877: Warn about unused static file scope function template declarations.

2017-04-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 94293. v.g.vassilev marked 2 inline comments as done. v.g.vassilev added a comment. Iterate over the specs. Diagnose unused variable templates. https://reviews.llvm.org/D29877 Files: include/clang/Sema/Sema.h lib/Sema/Sema.cpp

[libunwind] r299591 - AddressSpace: fix DWARF based unwinding handling on Android

2017-04-05 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Apr 5 16:29:38 2017 New Revision: 299591 URL: http://llvm.org/viewvc/llvm-project?rev=299591=rev Log: AddressSpace: fix DWARF based unwinding handling on Android It is possible that there are no program headers in the module. Do not attempt to dereference nullptr as

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-04-05 Thread Julian Bangert via Phabricator via cfe-commits
jbangert accepted this revision. jbangert marked 2 inline comments as done. jbangert added inline comments. Comment at: unittests/Tooling/RefactoringCallbacksTest.cpp:101 + std::string Expected = "void f() { FOO }"; + ReplaceNodeWithTemplate Callback("id", "FOO"); +

[PATCH] D29621: Add ASTMatchRefactorer and ReplaceNodeWithTemplate to RefactoringCallbacks

2017-04-05 Thread Julian Bangert via Phabricator via cfe-commits
jbangert updated this revision to Diff 94282. jbangert added a comment. - Merge branch 'master' of http://llvm.org/git/clang into replace_template https://reviews.llvm.org/D29621 Files: include/clang/Tooling/RefactoringCallbacks.h lib/Tooling/RefactoringCallbacks.cpp

[PATCH] D31725: [libc++] Add _LIBCPP_DISABLE_EXTERN_TEMPLATE config option

2017-04-05 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai created this revision. When the libc++ extern template macros were added, the intent was for it to be possible for consumers of the headers to disable extern templates (via `-D_LIBCPP_EXTERN_TEMPLATE(...)=`). Unfortunately, support for specifying function-like macros varies on the command

[PATCH] D29660: [OpenMP] Add flag for overwriting default PTX version for OpenMP targets

2017-04-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/Cuda.cpp:495-506 + + StringRef PtxVersion = DriverArgs.getLastArgValue( +options::OPT_fopenmp_ptx_EQ); + CC1Args.push_back("+ptx42"); + if (DeviceOffloadingKind == Action::OFK_OpenMP &&

[PATCH] D31401: [clangd] Extract FsPath from file:// uri

2017-04-05 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu marked 5 inline comments as done. stanionascu added inline comments. Comment at: clangd/Protocol.cpp:61 if (KeyValue == "uri") { - Result.uri = Value->getValue(Storage); + Result.uri = Uri::parse(Value->getValue(Storage)); } else if (KeyValue ==

[PATCH] D31401: [clangd] Extract FsPath from file:// uri

2017-04-05 Thread Stanislav Ionascu via Phabricator via cfe-commits
stanionascu updated this revision to Diff 94271. stanionascu added a comment. Refactored URI handling to make it more explicit, also updated the parts which expect a File parameter and not an URI. https://reviews.llvm.org/D31401 Files: clangd/ASTManager.cpp clangd/ASTManager.h

[PATCH] D30087: [Driver] Unify linking of OpenMP runtime

2017-04-05 Thread Alexey Bataev via Phabricator via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains/CommonArgs.cpp:430 +bool tools::addOpenMPRuntime(ArgStringList , const ToolChain , + const ArgList , const JobAction , + bool GompNeedsRT) {

[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-05 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment. As an include-what-you-use maintainer, I would very much welcome this. I've been too shy to suggest it myself ;-). https://reviews.llvm.org/D31696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31540: Prefer non-friend to friend in in redeclaration chain

2017-04-05 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren added a comment. Thanks, I'll make a test. Repository: rL LLVM https://reviews.llvm.org/D31540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r299577 - [lit] Fix Analysis test format pickling error

2017-04-05 Thread Reid Kleckner via cfe-commits
Author: rnk Date: Wed Apr 5 13:56:48 2017 New Revision: 299577 URL: http://llvm.org/viewvc/llvm-project?rev=299577=rev Log: [lit] Fix Analysis test format pickling error Move the test format into a standalone .py file and add it to the site module search path. This allows us to run the test on

[libunwind] r299575 - Fix invalid memory access on android x86

2017-04-05 Thread Saleem Abdulrasool via cfe-commits
Author: compnerd Date: Wed Apr 5 13:33:23 2017 New Revision: 299575 URL: http://llvm.org/viewvc/llvm-project?rev=299575=rev Log: Fix invalid memory access on android x86 On certain versions of android x86, the main module `app_process` is not built as PIE. When accessing the

[PATCH] D31717: CodeGen: Emit lifetime intrinsics with pointer argument in alloca address space

2017-04-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D31717#719362, @arsenm wrote: > I had the part for non-0 alloca too, but not sure if I posted it. It's in my > GitHub branch For that one we'd better stick to https://reviews.llvm.org/D31404 since the review is almost done. I will

[PATCH] D30922: [Builtins] Synchronize the definition of fma/fmaf/fmal in Builtins.def with the implementation in CGBuiltins.cpp

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

r299574 - clang-format: Support formatting utf-8 character literals in C++11+ mode.

2017-04-05 Thread Nico Weber via cfe-commits
Author: nico Date: Wed Apr 5 13:10:42 2017 New Revision: 299574 URL: http://llvm.org/viewvc/llvm-project?rev=299574=rev Log: clang-format: Support formatting utf-8 character literals in C++11+ mode. clang-format

[PATCH] D31717: CodeGen: Emit lifetime intrinsics with pointer argument in alloca address space

2017-04-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I had the part for non-0 alloca too, but not sure if I posted it. It's in my GitHub branch https://reviews.llvm.org/D31717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31717: CodeGen: Emit lifetime intrinsics with pointer argument in alloca address space

2017-04-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D31717#719316, @arsenm wrote: > I already have https://reviews.llvm.org/D31043 which can be committed > independently of the alloca change I did not know you already have a patch. Can you add reviewers to it? The only difference is that I

[PATCH] D31717: CodeGen: Emit lifetime intrinsics with pointer argument in alloca address space

2017-04-05 Thread Matt Arsenault via Phabricator via cfe-commits
arsenm added a comment. I already have https://reviews.llvm.org/D31043 which can be committed independently of the alloca change https://reviews.llvm.org/D31717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31717: CodeGen: Emit lifetime intrinsics with pointer argument in alloca address space

2017-04-05 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. Herald added a subscriber: wdng. There is incoming LLVM changes for letting alloca return pointers to alloca address space specified by data layout and correspondingly letting lifetime intrinsics to accept pointer arguments in alloca address space.

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2017-04-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno added inline comments. Comment at: lib/Sema/SemaExpr.cpp:8188 + //type and then perform the rest of the checks here. GCC as of + //pre-release 7.0 does not accept this though. + if (VectorEltTy->isIntegralType(S.Context) && sdardis

[clang-tools-extra] r299561 - Fix -Wmissing-field-initializer warnings to unbreak the -Werror build

2017-04-05 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Wed Apr 5 11:50:19 2017 New Revision: 299561 URL: http://llvm.org/viewvc/llvm-project?rev=299561=rev Log: Fix -Wmissing-field-initializer warnings to unbreak the -Werror build Modified: clang-tools-extra/trunk/unittests/clang-rename/RenameClassTest.cpp Modified:

[PATCH] D31667: [Sema] Extend GetSignedVectorType to deal with non ExtVector types

2017-04-05 Thread Bruno Cardoso Lopes via Phabricator via cfe-commits
bruno accepted this revision. bruno added a comment. This revision is now accepted and ready to land. Thanks Simon! LGTM https://reviews.llvm.org/D31667 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31428: [x86] fix AVX FP cmp intrinsic documentation (PR28110)

2017-04-05 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. Ping. https://reviews.llvm.org/D31428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D31713: [Basic] getColumnNumber returns location of CR+LF on Windows

2017-04-05 Thread Chih-Hung Hsieh via Phabricator via cfe-commits
chh created this revision. When fixing a Clang-Tidy bug in https://reviews.llvm.org/D31406, http://bugs.llvm.org/show_bug.cgi?id=32402, reuse of FileID enabled the missing highlightRange function. Assertion in highlightRange failed because the end-of-range column number was 2 + the last column of

[PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2017-04-05 Thread Sanjay Patel via Phabricator via cfe-commits
spatel added a comment. In https://reviews.llvm.org/D23418#719139, @NoQ wrote: > Hmm, reverted because i'm seeing crashes on some buildbots (works for me > though). > > It's crashing somewhere in `saveHash`, seems that some `Stmt`s are null. For > instance, >

[PATCH] D15994: Allow for unfinished #if blocks in preambles.

2017-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added a comment. Thanks for working on this! I have some comments below: Comment at: include/clang/Lex/Preprocessor.h:291 + +void setState(State s) { ConditionalStackState = s; } + `setState` is redundant IMHO, just assign to

[PATCH] D31669: Fix lambda to block conversion in C++17 by avoiding copy elision for the lambda capture used by the created block

2017-04-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Looks good, thanks. Repository: rL LLVM https://reviews.llvm.org/D31669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2017-04-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ reopened this revision. NoQ added a comment. This revision is now accepted and ready to land. Hmm, reverted because i'm seeing crashes on some buildbots (works for me though). It's crashing somewhere in `saveHash`, seems that some `Stmt`s are null. For instance,

Re: [PATCH] D30009: Add support for '#pragma clang attribute'

2017-04-05 Thread Duncan P. N. Exon Smith via cfe-commits
> On Apr 5, 2017, at 05:44, Alex L wrote: > > > > On 5 April 2017 at 13:38, Duncan Exon Smith > wrote: > > > > On Apr 5, 2017, at 05:13, Aaron Ballman via Phabricator > >

r299550 - Revert "[analyzer] Add a modular constraint system to the CloneDetector"

2017-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Apr 5 10:06:17 2017 New Revision: 299550 URL: http://llvm.org/viewvc/llvm-project?rev=299550=rev Log: Revert "[analyzer] Add a modular constraint system to the CloneDetector" This reverts commit r299544. Crashes on tests on some buildbots. Removed:

[PATCH] D31496: Make -defsym a driver option

2017-04-05 Thread Sanne Wouda via Phabricator via cfe-commits
sanwou01 added reviewers: rnk, rsmith. sanwou01 added a comment. Hi Salman, This essentially looks good to me. I don't think I'm the right person to LGTM this however, so I've added some reviewers who might be able to have a look. Thanks, Sanne https://reviews.llvm.org/D31496

[PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector

2017-04-05 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299544: [analyzer] Add a modular constraint system to the CloneDetector (authored by dergachev). Changed prior to commit: https://reviews.llvm.org/D23418?vs=93503=94227#toc Repository: rL LLVM

r299544 - [analyzer] Add a modular constraint system to the CloneDetector

2017-04-05 Thread Artem Dergachev via cfe-commits
Author: dergachev Date: Wed Apr 5 09:17:36 2017 New Revision: 299544 URL: http://llvm.org/viewvc/llvm-project?rev=299544=rev Log: [analyzer] Add a modular constraint system to the CloneDetector A big part of the clone detection code is functionality for filtering clones and clone groups based

[PATCH] D31709: [NFC] Refactor DiagnosticRenderer to use FullSourceLoc

2017-04-05 Thread Sanne Wouda via Phabricator via cfe-commits
sanwou01 created this revision. Move the DiagnosticRenderer and its dependents to using FullSourceLocs instead of a SourceLocation and SourceManager pointer. The changeset is rather large but entirely mechanical. This is step one to allow DiagnosticRenderer to take either llvmn::SMLocs or

r299543 - clang-format-vsix: Add "Format on Save" feature

2017-04-05 Thread Antonio Maiorano via cfe-commits
Author: amaiorano Date: Wed Apr 5 09:13:45 2017 New Revision: 299543 URL: http://llvm.org/viewvc/llvm-project?rev=299543=rev Log: clang-format-vsix: Add "Format on Save" feature This change adds a feature to the clang-format VS extension that optionally enables the automatic formatting of

[PATCH] D29221: clang-format-vsix: "format on save" feature

2017-04-05 Thread Antonio Maiorano via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299543: clang-format-vsix: Add "Format on Save" feature (authored by amaiorano). Changed prior to commit: https://reviews.llvm.org/D29221?vs=89815=94225#toc Repository: rL LLVM

r299541 - -Wunreachable-code: 'true' and 'false' should not be treated as configuration

2017-04-05 Thread Alex Lorenz via cfe-commits
Author: arphaman Date: Wed Apr 5 09:07:21 2017 New Revision: 299541 URL: http://llvm.org/viewvc/llvm-project?rev=299541=rev Log: -Wunreachable-code: 'true' and 'false' should not be treated as configuration macros Clang should emit -Wunreachable-code warnings in C mode for code that's

[PATCH] D25866: [Sema] Support implicit scalar to vector conversions

2017-04-05 Thread Simon Dardis via Phabricator via cfe-commits
sdardis marked an inline comment as done. sdardis added a comment. Thanks for sticking with this. I've held off updating the diff until https://reviews.llvm.org/D31667 (not https://reviews.llvm.org/D31337 as previously posted) is finished. Responses inlined. Comment at:

[PATCH] D31650: [Analyzer] Detect when function pointer is freed

2017-04-05 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. > void *p = malloc(sizeof(fnptr)); sorry ... I guess that should be something like "void *p = malloc(100);" Repository: rL LLVM https://reviews.llvm.org/D31650 ___ cfe-commits mailing list

[PATCH] D31650: [Analyzer] Detect when function pointer is freed

2017-04-05 Thread Daniel Marjamäki via Phabricator via cfe-commits
danielmarjamaki added a comment. In https://reviews.llvm.org/D31650#717691, @NoQ wrote: > Is freeing function pointers always undefined? I guess not.. however I don't personally see why it would be useful to allocate function pointers with malloc. > I wonder what happens if we take some

[PATCH] D31706: [clang-format] Handle NSString literals by merging tokens.

2017-04-05 Thread Alexander Kornienko via Phabricator via cfe-commits
alexfh created this revision. Herald added a subscriber: klimek. This fixes a couple of outstanding bugs: - incorrect breaking of NSString literals containing double-width characters; - inconsistent formatting of ObjC dictionary literals containing NSString literals; -

r299537 - [OpenCL] Extended diagnostics for atomic initialization

2017-04-05 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Wed Apr 5 07:47:10 2017 New Revision: 299537 URL: http://llvm.org/viewvc/llvm-project?rev=299537=rev Log: [OpenCL] Extended diagnostics for atomic initialization Summary: I saw the same changes in the following review: https://reviews.llvm.org/D17438 I don't know in that

Re: [PATCH] D30009: Add support for '#pragma clang attribute'

2017-04-05 Thread Alex L via cfe-commits
On 5 April 2017 at 13:38, Duncan Exon Smith wrote: > > > > On Apr 5, 2017, at 05:13, Aaron Ballman via Phabricator < > revi...@reviews.llvm.org> wrote: > > > > aaron.ballman added inline comments. > > > > > > > > Comment at: lib/Sema/SemaAttr.cpp:578 > > +

Re: [PATCH] D30009: Add support for '#pragma clang attribute'

2017-04-05 Thread Duncan Exon Smith via cfe-commits
> On Apr 5, 2017, at 05:13, Aaron Ballman via Phabricator > wrote: > > aaron.ballman added inline comments. > > > > Comment at: lib/Sema/SemaAttr.cpp:578 > +return; > + Diag(PragmaAttributeStack.back().Loc, >

[PATCH] D31667: [Sema] Extend GetSignedVectorType to deal with non ExtVector types

2017-04-05 Thread Simon Dardis via Phabricator via cfe-commits
sdardis updated this revision to Diff 94205. sdardis marked 5 inline comments as done. sdardis added a comment. Addressed review comments, added more tests. https://reviews.llvm.org/D31667 Files: lib/Sema/SemaExpr.cpp test/Sema/vector-ops.c Index: test/Sema/vector-ops.c

[PATCH] D31591: Fix a bug which access nullptr and cause segmentation fault

2017-04-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. @yamaguchi, I'd support Akira's comment. Could you place the minimal test example in the suggested file? https://reviews.llvm.org/D31591 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D30909: [Analyzer] Finish taint propagation to derived symbols of tainted regions

2017-04-05 Thread Artem Dergachev via Phabricator via cfe-commits
NoQ added inline comments. Comment at: lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp:494 + SymbolManager = C.getSymbolManager(); + return SM.getDerivedSymbol(Sym, LCV.getRegion()); } vlad.tsyrklevich wrote: > NoQ wrote: > > I'd think about this a bit

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-04-05 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: lib/Sema/SemaAttr.cpp:578 +return; + Diag(PragmaAttributeStack.back().Loc, diag::warn_pragm_attribute_no_pop_eof); +} arphaman wrote: > aaron.ballman wrote: > > Perhaps adding a FixIt here would be a

[PATCH] D30009: Add support for '#pragma clang attribute'

2017-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: lib/Sema/SemaAttr.cpp:578 +return; + Diag(PragmaAttributeStack.back().Loc, diag::warn_pragm_attribute_no_pop_eof); +} aaron.ballman wrote: > Perhaps adding a FixIt here would be a kindness? Where would the fix-it

[PATCH] D31698: clang-format: [JS] fix whitespace around "of" operator.

2017-04-05 Thread Martin Probst via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299533: clang-format: [JS] fix whitespace around "of" operator. (authored by mprobst). Changed prior to commit: https://reviews.llvm.org/D31698?vs=94188=94189#toc Repository: rL LLVM

r299533 - clang-format: [JS] fix whitespace around "of" operator.

2017-04-05 Thread Martin Probst via cfe-commits
Author: mprobst Date: Wed Apr 5 05:56:07 2017 New Revision: 299533 URL: http://llvm.org/viewvc/llvm-project?rev=299533=rev Log: clang-format: [JS] fix whitespace around "of" operator. Summary: Previously: import {of } from 'x'; of (null); Now: import {of} from 'x'; of(null);

[PATCH] D31698: clang-format: [JS] fix whitespace around "of" operator.

2017-04-05 Thread Martin Probst via Phabricator via cfe-commits
mprobst updated this revision to Diff 94188. mprobst added a comment. - improve comment https://reviews.llvm.org/D31698 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestJS.cpp Index: unittests/Format/FormatTestJS.cpp

[PATCH] D31540: Prefer non-friend to friend in in redeclaration chain

2017-04-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev added a comment. Could you also add the testcase where the friend declaration has some attributes? Repository: rL LLVM https://reviews.llvm.org/D31540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31702: Append -w when LLVM_ENABLE_WARNINGS is Off.

2017-04-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev updated this revision to Diff 94180. v.g.vassilev marked an inline comment as done. v.g.vassilev added a comment. Ah good point. Thanks! https://reviews.llvm.org/D31702 Files: cmake/modules/HandleLLVMOptions.cmake Index: cmake/modules/HandleLLVMOptions.cmake

[PATCH] D31702: Append -w when LLVM_ENABLE_WARNINGS is Off.

2017-04-05 Thread Yaron Keren via Phabricator via cfe-commits
yaron.keren added inline comments. Comment at: cmake/modules/HandleLLVMOptions.cmake:562 add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG) +else() + append("-w" CMAKE_C_FLAGS CMAKE_CXX_FLAGS) note this is an else to if

[PATCH] D31702: Append -w when LLVM_ENABLE_WARNINGS is Off.

2017-04-05 Thread Vassil Vassilev via Phabricator via cfe-commits
v.g.vassilev created this revision. Herald added a subscriber: mgorny. This is very useful for projects which embed LLVM in their codebases. Repository: rL LLVM https://reviews.llvm.org/D31702 Files: cmake/modules/HandleLLVMOptions.cmake Index: cmake/modules/HandleLLVMOptions.cmake

[PATCH] D31669: Fix lambda to block conversion in C++17 by avoiding copy elision for the lambda capture used by the created block

2017-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 94177. arphaman marked 2 inline comments as done. arphaman added a comment. Use a new EntityKind and improve test. Repository: rL LLVM https://reviews.llvm.org/D31669 Files: include/clang/Sema/Initialization.h lib/Sema/SemaInit.cpp

r299524 - [OpenCL] Enables passing sampler initializer to function argument

2017-04-05 Thread Egor Churaev via cfe-commits
Author: echuraev Date: Wed Apr 5 04:02:56 2017 New Revision: 299524 URL: http://llvm.org/viewvc/llvm-project?rev=299524=rev Log: [OpenCL] Enables passing sampler initializer to function argument Reviewers: Anastasia, cfe-commits Reviewed By: Anastasia Subscribers: yaxunl, bader Differential

r299523 - [analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16; ' expression, that is not unsafe

2017-04-05 Thread Daniel Marjamaki via cfe-commits
Author: danielmarjamaki Date: Wed Apr 5 03:57:04 2017 New Revision: 299523 URL: http://llvm.org/viewvc/llvm-project?rev=299523=rev Log: [analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16;' expression, that is not unsafe Summary: The alpha.core.Conversion was too strict about

[PATCH] D25596: alpha.core.Conversion - Fix false positive for 'U32 += S16; ' expression, that is not unsafe

2017-04-05 Thread Daniel Marjamäki via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299523: [analyzer] alpha.core.Conversion - Fix false positive for 'U32 += S16;'… (authored by danielmarjamaki). Changed prior to commit: https://reviews.llvm.org/D25596?vs=92810=94176#toc Repository:

[PATCH] D31235: Enhance -Wshadow to warn when shadowing typedefs or type aliases

2017-04-05 Thread Stephan Bergmann via Phabricator via cfe-commits
sberg added a comment. Comitted follow-up diff 94007 as rL299522: Don't issue a warning if the shadowing declaration is in a class now. https://reviews.llvm.org/D31235 ___ cfe-commits mailing list

r299522 - Don't issue a warning if the shadowing declaration is in a class

2017-04-05 Thread Stephan Bergmann via cfe-commits
Author: sberg Date: Wed Apr 5 03:36:58 2017 New Revision: 299522 URL: http://llvm.org/viewvc/llvm-project?rev=299522=rev Log: Don't issue a warning if the shadowing declaration is in a class Follow-up to r299363 "Enhance -Wshadow to warn when shadowing typedefs or type aliases". Patch by Ahmed

[PATCH] D31698: clang-format: [JS] fix whitespace around "of" operator.

2017-04-05 Thread Daniel Jasper via Phabricator via cfe-commits
djasper accepted this revision. djasper added inline comments. This revision is now accepted and ready to land. Comment at: lib/Format/TokenAnnotator.cpp:2275 + tok::kw_const) || + // "of" can only occur in a for loop, as a "const x of y". +