Re: [PATCH] D18551: Added Fixer implementation and fix() interface in clang-format for removing redundant code.

2016-04-12 Thread Daniel Jasper via cfe-commits
djasper added inline comments. Comment at: lib/Format/Format.cpp:1677 @@ +1676,3 @@ + +class Formatter { +public: I think FormatStyle in the Processor should be const and Formatter should make its own copy to modify it. Comment at: lib/Format/Fo

Re: [PATCH] D16797: Update clang support on recent Haiku

2016-04-12 Thread Jérôme Duval via cfe-commits
korli updated this revision to Diff 53464. korli added a comment. Updated patch against trunk (following changes in lib/Basic/Targets.cpp). Repository: rL LLVM http://reviews.llvm.org/D16797 Files: lib/Basic/Targets.cpp lib/Driver/Driver.cpp lib/Driver/ToolChains.cpp lib/Driver/ToolC

[PATCH] D19048: Test for a module related crash in CGDebugInfo.cpp

2016-04-12 Thread Douglas Yung via cfe-commits
dyung created this revision. dyung added a reviewer: aprantl. dyung added a subscriber: cfe-commits. In our internal testing, we found a crash in the compiler which was reduced to the attached test case. The issue was "fixed" a while back with Adrian's change in r248069 as the code causing the c

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-12 Thread Andrey Bokhanko via cfe-commits
andreybokhanko marked an inline comment as done. Comment at: test/SemaCXX/MicrosoftExtensions.cpp:89 @@ +88,3 @@ +void foo_unaligned(int *arg) {} +void foo_unaligned(__unaligned int *arg) {} +void foo_unaligned(int arg) {} // expected-note {{previous definition is here}} -

Re: [PATCH] D18596: [MSVC] PR27132: Proper mangling for __unaligned qualifier

2016-04-12 Thread Andrey Bokhanko via cfe-commits
andreybokhanko updated this revision to Diff 53509. andreybokhanko added a comment. 1. Added more comprehensive overloading tests 2. Added a warning (in C mode) / error (in C++ mode) on __unaligned to non-__unaligned type conversion Andrey http://reviews.llvm.org/D18596 Files: include/clang

r266157 - [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation.

2016-04-12 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Apr 12 19:41:54 2016 New Revision: 266157 URL: http://llvm.org/viewvc/llvm-project?rev=266157&view=rev Log: [analyzer] Nullability: Treat nil _Nonnull ivar as invariant violation. Treat a _Nonnull ivar that is nil as an invariant violation in a similar fashion to how a

r266154 - clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'.

2016-04-12 Thread NAKAMURA Takumi via cfe-commits
Author: chapuni Date: Tue Apr 12 19:22:25 2016 New Revision: 266154 URL: http://llvm.org/viewvc/llvm-project?rev=266154&view=rev Log: clang/test/Driver/cl-options.c: Fix an expression to recognize dos r'\\'. Modified: cfe/trunk/test/Driver/cl-options.c Modified: cfe/trunk/test/Driver/cl-opti

Re: [PATCH] D18073: Add memory allocating functions

2016-04-12 Thread Alexander Riccio via cfe-commits
ariccio added a comment. In http://reviews.llvm.org/D18073#398882, @zaks.anna wrote: > "Since we are adding support for so many new APIs that are only available on > Windows, could you please condition checking them only when we build for > Windows. You probably can look and Language Options to

Re: [PATCH] D18073: Add memory allocating functions

2016-04-12 Thread Alexander Riccio via cfe-commits
ariccio updated this revision to Diff 53495. ariccio added a comment. Changed the new file name. http://reviews.llvm.org/D18073 Files: llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp llvm/tools/clang/test/Analysis/alternative-malloc-api.c llvm/tools/clang/test/Analysis/mall

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Bruno Cardoso Lopes via cfe-commits
bruno abandoned this revision. bruno added a comment. Hi Ben, Comment at: lib/Basic/FileManager.cpp:221-223 @@ -220,2 +220,5 @@ // See if there is already an entry in the map. + // FIXME: Note that when first requested, the returned file name equals to the + // requested p

Re: [PATCH] D18618: [ObjC] Pop all cleanups created in CodeGenFunction::EmitObjCForCollectionStmt

2016-04-12 Thread Akira Hatanaka via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266147: [ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before (authored by ahatanak). Changed prior to commit: http://reviews.llvm.org/D18618?vs=52609&id=53489#toc Repository: rL LLVM

r266147 - [ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before

2016-04-12 Thread Akira Hatanaka via cfe-commits
Author: ahatanak Date: Tue Apr 12 18:10:58 2016 New Revision: 266147 URL: http://llvm.org/viewvc/llvm-project?rev=266147&view=rev Log: [ObjC] Pop all cleanups created in EmitObjCForCollectionStmt before exiting the for-in loop. This commit fixes a bug where EmitObjCForCollectionStmt didn't pop cl

r266146 - ObjC class properties: add diagnostics for unimplemented class properties.

2016-04-12 Thread Manman Ren via cfe-commits
Author: mren Date: Tue Apr 12 18:01:55 2016 New Revision: 266146 URL: http://llvm.org/viewvc/llvm-project?rev=266146&view=rev Log: ObjC class properties: add diagnostics for unimplemented class properties. rdar://24711047 Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe

Re: [PATCH] D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes

2016-04-12 Thread Manman Ren via cfe-commits
manmanren added a comment. LGTM. Manman http://reviews.llvm.org/D18997 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 53480. michael_miller added a comment. Broke out the cfe parts into its own change (http://reviews.llvm.org/D19038). http://reviews.llvm.org/D18584 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTyp

[PATCH] D19038: Add AST Matchers for CXXConstructorDecl::isDelegatingConstructor and CXXMethodDecl::isUserProvided.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller created this revision. michael_miller added reviewers: alexfh, aaron.ballman. michael_miller added a subscriber: cfe-commits. Herald added a subscriber: klimek. Added two AST matchers: isDelegatingConstructor for CXXConstructorDecl::IsDelegatingConstructor; and isUserProvided corre

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Cameron via cfe-commits
cameron314 added a comment. Ooh, and I should also add, there's a non-trivial cost to grabbing the entire file contents as a string and then converting it to UTF-8. If ClangFormat was faster, this would certainly become a significant bottleneck that can't really be worked around. http://revie

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Cameron via cfe-commits
cameron314 added a comment. We did profile at one point, to see if it was something we could trivially speed up (it wasn't). Most of it was on the parsing/annotation side, yes (which makes sense, since that's the majority of the work when the format region itself is limited). I'm afraid I don't

Re: [PATCH] D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes

2016-04-12 Thread Bruno Cardoso Lopes via cfe-commits
bruno updated this revision to Diff 53470. bruno added a comment. New patch after Manman's review. http://reviews.llvm.org/D18997 Files: include/clang/Sema/Sema.h lib/Parse/ParseObjc.cpp lib/Sema/SemaDeclObjC.cpp test/SemaObjC/parameterized_classes.m Index: test/SemaObjC/parameterized_

Re: [PATCH] D19029: Always use --eh-frame-hdr on FreeBSD, even for -static

2016-04-12 Thread Davide Italiano via cfe-commits
davide added a subscriber: davide. davide added a comment. LGTM. Repository: rL LLVM http://reviews.llvm.org/D19029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D19029: Always use --eh-frame-hdr on FreeBSD, even for -static

2016-04-12 Thread Davide Italiano via cfe-commits
LGTM. On Tue, Apr 12, 2016 at 2:17 PM, Ed Maste wrote: > This revision was automatically updated to reflect the committed changes. > Closed by commit rL266123: Always use --eh-frame-hdr on FreeBSD, even for > -static (authored by emaste). > > Changed prior to commit: > http://reviews.llvm.org/

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18584#399056, @michael_miller wrote: > In http://reviews.llvm.org/D18584#399024, @alexfh wrote: > > > I can commit the patch for you, but you need to split it in two: one for > > the cfe repository, one for clang-tools-extra. > > > Great—thanks

Re: [PATCH] D18821: Add modernize-bool-to-integer-conversion

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. In http://reviews.llvm.org/D18821#399064, @Prazek wrote: > In http://reviews.llvm.org/D18821#398843, @alexfh wrote: > > > BTW, why is the check in the 'modernize' module? It doesn't seem to make > > anything more modern. I would guess, the pattern it detects is most likel

Re: [PATCH] D18748: [AMDGPU] Add debugger related target options

2016-04-12 Thread Konstantin Zhuravlyov via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266133: [AMDGPU] Add debugger related target options (authored by kzhuravl). Changed prior to commit: http://reviews.llvm.org/D18748?vs=52516&id=53466#toc Repository: rL LLVM http://reviews.llvm.org

r266133 - [AMDGPU] Add debugger related target options

2016-04-12 Thread Konstantin Zhuravlyov via cfe-commits
Author: kzhuravl Date: Tue Apr 12 16:42:15 2016 New Revision: 266133 URL: http://llvm.org/viewvc/llvm-project?rev=266133&view=rev Log: [AMDGPU] Add debugger related target options Differential Revision: http://reviews.llvm.org/D18748 Added: cfe/trunk/test/Driver/amdgpu-features.c Modified:

Re: [PATCH] D18821: Add modernize-bool-to-integer-conversion

2016-04-12 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In http://reviews.llvm.org/D18821#398843, @alexfh wrote: > BTW, why is the check in the 'modernize' module? It doesn't seem to make > anything more modern. I would guess, the pattern it detects is most likely to > result from a programming error. Also, the fix, though it

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Daniel Jasper via cfe-commits
djasper added a comment. It has very basic newline detection, but if possible, I'd like to not significantly increase that. Specifically, I don't think it is worth the complexity of additional configuration options that users have to worry about, if it can just do the right thing (which IMO, it

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#399024, @alexfh wrote: > I can commit the patch for you, but you need to split it in two: one for the > cfe repository, one for clang-tools-extra. Great—thanks! I have them separated already and had to merge them for the Phabri

r266127 - Add a fixme for an old patch I had lying around that I'm not going to finish any time so n

2016-04-12 Thread David Blaikie via cfe-commits
Author: dblaikie Date: Tue Apr 12 16:22:48 2016 New Revision: 266127 URL: http://llvm.org/viewvc/llvm-project?rev=266127&view=rev Log: Add a fixme for an old patch I had lying around that I'm not going to finish any time so n Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Modified: cfe/tru

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Cameron via cfe-commits
cameron314 added a comment. Too late ;-) We've successfully integrated it as the engine behind our auto-formatting feature, passing only the minimal context necessary. We tried at first to supply the full file context, but that turned out to be much too slow in larger files. (We did a fair bit o

Re: [PATCH] D18473: AMDGPU: Add test for generic builtin behavior

2016-04-12 Thread Matt Arsenault via cfe-commits
arsenm added inline comments. Comment at: lib/Basic/Targets.cpp:1854-1857 @@ -1853,1 +1853,6 @@ + bool isCLZForZeroUndef() const override { +// It is -1 instead of expected for intrinsic. +return true; + } + tstellarAMD wrote: > Why do we need to add t

Re: [PATCH] D19029: Always use --eh-frame-hdr on FreeBSD, even for -static

2016-04-12 Thread Ed Maste via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266123: Always use --eh-frame-hdr on FreeBSD, even for -static (authored by emaste). Changed prior to commit: http://reviews.llvm.org/D19029?vs=53452&id=53460#toc Repository: rL LLVM http://reviews.

r266123 - Always use --eh-frame-hdr on FreeBSD, even for -static

2016-04-12 Thread Ed Maste via cfe-commits
Author: emaste Date: Tue Apr 12 16:11:46 2016 New Revision: 266123 URL: http://llvm.org/viewvc/llvm-project?rev=266123&view=rev Log: Always use --eh-frame-hdr on FreeBSD, even for -static FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and is expected to use it more widely in the future), a

r266122 - Add a couple of missing vsx load and store intrinsics.

2016-04-12 Thread Eric Christopher via cfe-commits
Author: echristo Date: Tue Apr 12 16:08:54 2016 New Revision: 266122 URL: http://llvm.org/viewvc/llvm-project?rev=266122&view=rev Log: Add a couple of missing vsx load and store intrinsics. Patch by Jing Yu! Modified: cfe/trunk/lib/Headers/altivec.h cfe/trunk/test/CodeGen/builtins-ppc-vs

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Daniel Jasper via cfe-commits
djasper added a comment. Passing snippets / single lines from an IDE does not make sense. Don't try to go down this road. clang-format always needs the full file as context. If you are already in an IDE, that IDE should control the line endings, not clang-format. Write a thin wrapper that chang

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. I can commit the patch for you, but you need to split it in two: one for the cfe repository, one for clang-tools-extra. http://reviews.llvm.org/D18584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Cameron via cfe-commits
cameron314 added a comment. Sure :-) The motivation behind this patch (and a few more upcoming ones) is to make ClangFormat (the library) more friendly for IDE integration (which is our primary use case), in particular for on-the-fly auto-formatting. In an IDE auto-format setting, it's often t

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Daniel Jasper via cfe-commits
djasper added a comment. Can you elaborate more on what case this is actually addressing? Are you saying that you have a one-line file without linebreaks that you want clang-format to format? http://reviews.llvm.org/D19031 ___ cfe-commits mailing

Re: [PATCH] D19031: clang-format: Flexible line endings

2016-04-12 Thread Cameron via cfe-commits
cameron314 added a comment. ClangFormat still needs to know what kind of newline to insert when reformatting code. It already had the "auto-detect newline" behaviour; this patch simply allows the auto-detection to be overridden with an explicit setting. This is important for short files that ha

Re: [PATCH] D19029: Always use --eh-frame-hdr on FreeBSD, even for -static

2016-04-12 Thread Rafael Ávila de Espíndola via cfe-commits
rafael added a subscriber: rafael. rafael accepted this revision. rafael added a reviewer: rafael. rafael added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D19029 ___ cfe-commits mailing list cfe-commits@

Re: [PATCH] D19029: Always use --eh-frame-hdr on FreeBSD, even for -static

2016-04-12 Thread Ed Maste via cfe-commits
emaste updated this revision to Diff 53452. emaste added a comment. Test --eh-frame-hdr addition http://reviews.llvm.org/D19029 Files: lib/Driver/Tools.cpp test/Driver/freebsd.c Index: test/Driver/freebsd.c === --- test/Driver

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#398929, @alexfh wrote: > Do you have svn commit access? I do not... this is my first contribution to llvm/clang. http://reviews.llvm.org/D18584 ___ cfe-commits mailing list cfe-com

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: docs/ReleaseNotes.rst:100 @@ -99,1 +99,3 @@ +- New `misc-sizeof-expression + `_ check Please put this check after misc-mi

[PATCH] D19029: Always use --eh-frame-hdr on FreeBSD, even for -static

2016-04-12 Thread Ed Maste via cfe-commits
emaste created this revision. emaste added reviewers: dim, andrew, davide. emaste added a subscriber: cfe-commits. Herald added subscribers: emaste, aemerson. FreeBSD uses LLVM's libunwind on FreeBSD/arm64 today (and we expect to use it more widely in the future) and it requires the EH frame segm

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Do you have svn commit access? http://reviews.llvm.org/D18584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D17552: Pass -backend-option to LLVM when there is no target machine

2016-04-12 Thread Yaxun Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266117: Pass -backend-option to LLVM when there is no target machine. (authored by yaxunl). Changed prior to commit: http://reviews.llvm.org/D17552?vs=51326&id=53449#toc Repository: rL LLVM http://r

r266117 - Pass -backend-option to LLVM when there is no target machine.

2016-04-12 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 12 15:22:32 2016 New Revision: 266117 URL: http://llvm.org/viewvc/llvm-project?rev=266117&view=rev Log: Pass -backend-option to LLVM when there is no target machine. Clang should pass -backend-option to LLVM even though there is no target machine, since LLVM passes a

r266116 - [modules] Extend r266113 to cope with submodules.

2016-04-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 12 15:20:33 2016 New Revision: 266116 URL: http://llvm.org/viewvc/llvm-project?rev=266116&view=rev Log: [modules] Extend r266113 to cope with submodules. Modified: cfe/trunk/lib/Lex/PPDirectives.cpp cfe/trunk/test/Modules/explicit-build-missing-files.cpp Modi

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller marked an inline comment as done. michael_miller added a comment. In http://reviews.llvm.org/D18584#398298, @aaron.ballman wrote: > LGTM with one minor correction (you can correct when committing it). Also, what's the next step? Is there anything else for me to do? http://revie

r266113 - [modules] When an incompatible module file is explicitly provided for a module,

2016-04-12 Thread Richard Smith via cfe-commits
Author: rsmith Date: Tue Apr 12 14:58:30 2016 New Revision: 266113 URL: http://llvm.org/viewvc/llvm-project?rev=266113&view=rev Log: [modules] When an incompatible module file is explicitly provided for a module, and we fall back to textual inclusion, don't require the module as a whole to be mark

Re: [PATCH] D18595: MPI-Checker test helper

2016-04-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. You do not have to supply these. Just declaring and not defining the functions in the main test file should be sufficient. http://reviews.llvm.org/D18595 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://list

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good with one more nit. I'm not sure what to do with `hasSizeOfAncestor`, we can leave it as is for now. Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:47 @@ +46

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:198 @@ +197,3 @@ +} + +void SizeofExpressionCheck::check(const MatchFinder::MatchResult &Result) { I'm probably wrong about "a more effective approach in general", but for `sizeof

Re: [PATCH] D18073: Add memory allocating functions

2016-04-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. "Since we are adding support for so many new APIs that are only available on Windows, could you please condition checking them only when we build for Windows. You probably can look and Language Options to figure that out." malloc-uses.c -> "alternative-malloc-api.c" ?

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller added a comment. In http://reviews.llvm.org/D18584#398298, @aaron.ballman wrote: > LGTM with one minor correction (you can correct when committing it). Oops! Not sure how that happened. I submitted a revised diff. http://reviews.llvm.org/D18584 __

Re: [PATCH] D18584: Complete support for C++ Core Guidelines Type.6: Always initialize a member variable.

2016-04-12 Thread Michael Miller via cfe-commits
michael_miller updated this revision to Diff 53441. michael_miller added a comment. Removed accidentally duplicated test case. http://reviews.llvm.org/D18584 Files: clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.h clang-tidy/uti

Re: [PATCH] D17412: PR19957: [OpenCL] incorrectly accepts implicit address space conversion with ternary operator

2016-04-12 Thread Yaxun Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked an inline comment as done. Closed by commit rL266111: PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with… (authored by yaxunl). Changed prior to commit: http://reviews.llvm.org/D174

r266111 - PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary operator.

2016-04-12 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 12 14:43:36 2016 New Revision: 266111 URL: http://llvm.org/viewvc/llvm-project?rev=266111&view=rev Log: PR19957: [OpenCL] Incorrectly accepts implicit address space conversion with ternary operator. Generates addrspacecast instead of bitcast for ternary operator when

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Ben Langmuir via cfe-commits
benlangmuir added inline comments. Comment at: lib/Basic/FileManager.cpp:221-223 @@ -220,2 +220,5 @@ // See if there is already an entry in the map. + // FIXME: Note that when first requested, the returned file name equals to the + // requested path. This is not true when re

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 53442. etienneb marked an inline comment as done. etienneb added a comment. alexfh comments. http://reviews.llvm.org/D19014 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofExpressionCheck.cpp clang-tid

Re: [PATCH] D13610: [CodeGen] Fix CodeGenModule::CreateGlobalInitOrDestructFunction

2016-04-12 Thread Keno Fischer via cfe-commits
loladiro added a subscriber: loladiro. loladiro added a comment. Thanks for this. I was about to create the same patch (after seeing this broken on 3.7) only to see it had already been done! Repository: rL LLVM http://reviews.llvm.org/D13610 ___

Re: [PATCH] D18821: Add modernize-bool-to-integer-conversion

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. BTW, why is the check in the 'modernize' module? It doesn't seem to make anything more modern. I would guess, the pattern it detects is most likely to result from a programming error. Also, the fix, though it retains the behavior, has a high chance to be incorrect. Can y

r266109 - [analyzer] Nullability: Suppress return diagnostics in inlined functions.

2016-04-12 Thread Devin Coughlin via cfe-commits
Author: dcoughlin Date: Tue Apr 12 14:29:52 2016 New Revision: 266109 URL: http://llvm.org/viewvc/llvm-project?rev=266109&view=rev Log: [analyzer] Nullability: Suppress return diagnostics in inlined functions. The nullability checker can sometimes miss detecting nullability precondition violation

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Hi Ben, Comment at: lib/Basic/FileManager.cpp:221-223 @@ -220,2 +220,5 @@ // See if there is already an entry in the map. + // FIXME: Note that when first requested, the returned file name equals to the + // requested path. This is not true when retu

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:28 @@ +27,3 @@ + return Node.getValue().getZExtValue() > N; +} + There are no firm rules. It mostly depends on how generic/useful in other tools the matcher could be. This one se

Re: [PATCH] D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes

2016-04-12 Thread Bruno Cardoso Lopes via cfe-commits
bruno added a comment. Hi Manman, Comment at: lib/Parse/ParseObjc.cpp:1697 @@ -1696,3 +1696,3 @@ // We syntactically matched a type argument, so commit to parsing - // type arguments. + // type arguments. Finding protocol arguments after here is an error.

r266107 - [OpenCL] Handle AddressSpaceConversion when target address space does not change.

2016-04-12 Thread Yaxun Liu via cfe-commits
Author: yaxunl Date: Tue Apr 12 14:03:49 2016 New Revision: 266107 URL: http://llvm.org/viewvc/llvm-project?rev=266107&view=rev Log: [OpenCL] Handle AddressSpaceConversion when target address space does not change. In codegen different address spaces may be mapped to the same address space for a

RE: r262817 - [CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}

2016-04-12 Thread Demikhovsky, Elena via cfe-commits
Yes, we’ll try make the patches smaller and avoid such mistakes. - Elena From: Chandler Carruth [mailto:chandl...@google.com] Sent: Tuesday, April 12, 2016 20:25 To: Zuckerman, Michael ; cfe-commits@lists.llvm.org; Demikhovsky, Elena Subject: Re: r262817 - [CLANG][AVX512][BUILTIN] Add

r266108 - clang-cl: Remove -isystem, add -imsvc.

2016-04-12 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Apr 12 14:04:37 2016 New Revision: 266108 URL: http://llvm.org/viewvc/llvm-project?rev=266108&view=rev Log: clang-cl: Remove -isystem, add -imsvc. r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of the system include search path. The idea was to

Re: [PATCH] D18713: [OpenCL] Generate bitcast when target address space does not change.

2016-04-12 Thread Yaxun Liu via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL266107: [OpenCL] Handle AddressSpaceConversion when target address space does not… (authored by yaxunl). Changed prior to commit: http://reviews.llvm.org/D18713?vs=52800&id=53439#toc Repository: rL L

Re: [PATCH] D18748: [AMDGPU] Add debugger related target options

2016-04-12 Thread Matt Arsenault via cfe-commits
arsenm accepted this revision. arsenm added a comment. This revision is now accepted and ready to land. LGTM http://reviews.llvm.org/D18748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D12761: MPI-Checker patch for Clang Static Analyzer

2016-04-12 Thread Anna Zaks via cfe-commits
zaks.anna added a comment. Alexander, This patch is in a pretty good shape. I am fine with committing it and iterating with smaller updates in tree if it is more convenient for you. One task that I would like to very strongly encourage is running this on a lot of code. You will find a lot of i

Re: [PATCH] D14286: ASTImporter: expressions, pt.1

2016-04-12 Thread Sean Callanan via cfe-commits
spyffe accepted this revision. spyffe added a comment. This revision is now accepted and ready to land. This all looks fine to me, and the LLDB test suite is happy also. http://reviews.llvm.org/D14286 ___ cfe-commits mailing list cfe-commits@lists.l

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Etienne Bergeron via cfe-commits
etienneb added inline comments. Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:27 @@ +26,3 @@ + +AST_MATCHER(BinaryOperator, isRelationnalOperator) { + return Node.isRelationalOp(); alexfh wrote: > alexfh wrote: > > nit: extra 'n' in "relational" > I'd put

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 53437. etienneb marked 5 inline comments as done. etienneb added a comment. alexfh comments. http://reviews.llvm.org/D19014 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofExpressionCheck.cpp clang-tid

Re: [patch] clang-cl: Remove -isystem, add -imsvc, expose -nostdlibinc

2016-04-12 Thread Hans Wennborg via cfe-commits
LGTM On Tue, Apr 12, 2016 at 11:40 AM, Nico Weber wrote: > All done. phab's back, but since we started with a patch attachment, let's > keep it that way. > > > > On Tue, Apr 12, 2016 at 12:12 PM, Hans Wennborg wrote: >> >> On Mon, Apr 11, 2016 at 7:16 PM, Nico Weber wrote: >> > r260990 exposed

Re: [PATCH] D15469: Expose cxx constructor and method properties through libclang and python bindings.

2016-04-12 Thread Sergey Kalinichev via cfe-commits
skalinichev accepted this revision. skalinichev added a comment. LGTM! Comment at: bindings/python/tests/cindex/test_cursor.py:197 @@ +196,3 @@ + +def test_is_deleted_method(): +"""Ensure Cursor.is_deleted_method works.""" You should remove it too. http://

Re: [patch] clang-cl: Remove -isystem, add -imsvc, expose -nostdlibinc

2016-04-12 Thread Nico Weber via cfe-commits
All done. phab's back, but since we started with a patch attachment, let's keep it that way. On Tue, Apr 12, 2016 at 12:12 PM, Hans Wennborg wrote: > On Mon, Apr 11, 2016 at 7:16 PM, Nico Weber wrote: > > r260990 exposed -isystem in clang-cl. -isystem adds a directory to the > front > > of th

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:197 @@ +196,3 @@ + this); +} + What about this comment? Comment at: clang-tidy/misc/SizeofExpressionCheck.cpp:203 @@ +202,3 @@ + if (const auto *E = Result.

Re: [PATCH] D18748: [AMDGPU] Add debugger related target options

2016-04-12 Thread Konstantin Zhuravlyov via cfe-commits
kzhuravl added a comment. ping http://reviews.llvm.org/D18748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D18997: [SemaObjC] Properly diagnose type arguments and protocols mix in parameterized classes

2016-04-12 Thread Manman Ren via cfe-commits
manmanren added inline comments. Comment at: lib/Parse/ParseObjc.cpp:1697 @@ -1696,3 +1696,3 @@ // We syntactically matched a type argument, so commit to parsing - // type arguments. + // type arguments. Finding protocol arguments after here is an error. I

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 53436. etienneb added a comment. fix typos and doc. http://reviews.llvm.org/D19014 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofExpressionCheck.cpp clang-tidy/misc/SizeofExpressionCheck.h docs/Rel

Re: [PATCH] D18474: [OPENMP] Enable correct generation of runtime call when target directive is separated from teams directive by multiple curly brackets

2016-04-12 Thread Alexey Bataev via cfe-commits
ABataev accepted this revision. ABataev added a comment. This revision is now accepted and ready to land. LG, except for the small comment Comment at: lib/CodeGen/CGOpenMPRuntime.cpp:4260 @@ -4259,1 +4259,3 @@ +/// \brief discard all CompoundStmts intervening between two const

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 53431. etienneb added a comment. more unittests http://reviews.llvm.org/D19014 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofExpressionCheck.cpp clang-tidy/misc/SizeofExpressionCheck.h docs/Release

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 53429. etienneb added a comment. release notes. http://reviews.llvm.org/D19014 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofExpressionCheck.cpp clang-tidy/misc/SizeofExpressionCheck.h docs/Release

Re: [PATCH] D14286: ASTImporter: expressions, pt.1

2016-04-12 Thread Sean Callanan via cfe-commits
Aleksei, it looks like I might have made a bad assumption in my ImportArray – namely that there were some entities that required arrays of things they’re constructed with to be allocated in the ASTContext. Looking at the constructors for those entities, it looks like most of them actually do t

Re: [PATCH] D14286: ASTImporter: expressions, pt.1

2016-04-12 Thread Sean Callanan via cfe-commits
spyffe added a subscriber: spyffe. spyffe added a comment. Aleksei, it looks like I might have made a bad assumption in my ImportArray – namely that there were some entities that required arrays of things they’re constructed with to be allocated in the ASTContext. Looking at the constructors

r266095 - Stricter checks in the stack-protector codegen test.

2016-04-12 Thread Evgeniy Stepanov via cfe-commits
Author: eugenis Date: Tue Apr 12 12:51:59 2016 New Revision: 266095 URL: http://llvm.org/viewvc/llvm-project?rev=266095&view=rev Log: Stricter checks in the stack-protector codegen test. Modified: cfe/trunk/test/CodeGen/stack-protector.c Modified: cfe/trunk/test/CodeGen/stack-protector.c URL

Re: r266005 - Allow simultaneous safestack and stackprotector attributes.

2016-04-12 Thread Evgenii Stepanov via cfe-commits
Thanks, fixed in r266095 On Tue, Apr 12, 2016 at 10:15 AM, Robinson, Paul wrote: > > >> -Original Message- >> From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of >> Evgeniy Stepanov via cfe-commits >> Sent: Monday, April 11, 2016 3:28 PM >> To: cfe-commits@lists.llv

Re: r265994 - libclang: fix two memory leaks (PR26292)

2016-04-12 Thread Hans Wennborg via cfe-commits
While useful, that would require a lot of restructuring, I think. This file seems to mostly be dealing with C-style objects; ExprEvalResult doesn't even have a C++ destructor. I'm not going to dig into that, I just wanted to address this bug that someone reported. - Hans On Tue, Apr 12, 2016 a

Re: [PATCH] D19014: [clang-tidy] Add new checker for suspicious sizeof expressions

2016-04-12 Thread Etienne Bergeron via cfe-commits
etienneb updated this revision to Diff 53428. etienneb marked 6 inline comments as done. etienneb added a comment. fix alexfh@ comments http://reviews.llvm.org/D19014 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/SizeofExpressionCheck.cpp clang

Re: [PATCH] D18474: [OPENMP] Enable correct generation of runtime call when target directive is separated from teams directive by multiple curly brackets

2016-04-12 Thread Carlo Bertolli via cfe-commits
carlo.bertolli updated this revision to Diff 53425. carlo.bertolli added a comment. [OPENMP] Remove unnecessary templating of function. Repository: rL LLVM http://reviews.llvm.org/D18474 Files: lib/CodeGen/CGOpenMPRuntime.cpp test/OpenMP/teams_codegen.cpp Index: test/OpenMP/teams_codege

Re: [PATCH] D18474: [OPENMP] Enable correct generation of runtime call when target directive is separated from teams directive by multiple curly brackets

2016-04-12 Thread Carlo Bertolli via cfe-commits
carlo.bertolli marked an inline comment as done. carlo.bertolli added a comment. Great, thanks for the hint. I do much prefer your version of the function. I am updating the diff. Repository: rL LLVM http://reviews.llvm.org/D18474 ___ cfe-commit

Re: r262817 - [CLANG][AVX512][BUILTIN] Adding vpmultishiftqb{128|256|512}

2016-04-12 Thread Chandler Carruth via cfe-commits
On Mon, Mar 7, 2016 at 12:33 AM Michael Zuckerman via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: mzuckerm > Date: Mon Mar 7 02:29:10 2016 > New Revision: 262817 > > URL: http://llvm.org/viewvc/llvm-project?rev=262817&view=rev > Log: > [CLANG][AVX512][BUILTIN] Adding vpmultishiftqb

Re: [PATCH] D16044: getDescriptiveName() for MemRegion

2016-04-12 Thread Gábor Horváth via cfe-commits
xazax.hun added a comment. In http://reviews.llvm.org/D16044#398463, @zaks.anna wrote: > Can other checkers use this function? I am Ok with this being committed with > limited coverage. Once I rebase http://reviews.llvm.org/D15227, it will provide us with the limited coverage. In case that pa

RE: r266005 - Allow simultaneous safestack and stackprotector attributes.

2016-04-12 Thread Robinson, Paul via cfe-commits
> -Original Message- > From: cfe-commits [mailto:cfe-commits-boun...@lists.llvm.org] On Behalf Of > Evgeniy Stepanov via cfe-commits > Sent: Monday, April 11, 2016 3:28 PM > To: cfe-commits@lists.llvm.org > Subject: r266005 - Allow simultaneous safestack and stackprotector > attributes. >

Re: [PATCH] D18617: Call TargetMachine::addEarlyAsPossiblePasses from BackendUtil.

2016-04-12 Thread Chandler Carruth via cfe-commits
chandlerc added inline comments. Comment at: lib/CodeGen/BackendUtil.cpp:347 @@ +346,3 @@ +PassManagerBuilder::EP_EarlyAsPossible, +[&](const PassManagerBuilder &, legacy::PassManagerBase &PM) { + TM->addEarlyAsPossiblePasses(PM); Wow, C++

Re: [PATCH] D18849: [modules] Avoid module relocation error when building modules from VFS

2016-04-12 Thread Ben Langmuir via cfe-commits
benlangmuir added a comment. > From what I understand from > http://lists.llvm.org/pipermail/cfe-dev/2014-July/038273.html, changing the > behavior of the cached result has side-effects and demands a non trivial > change, am I assuming the right thing? Yes. Threading through the Filename see

r266091 - Revert 266090, needs more testing first.

2016-04-12 Thread Nico Weber via cfe-commits
Author: nico Date: Tue Apr 12 11:52:30 2016 New Revision: 266091 URL: http://llvm.org/viewvc/llvm-project?rev=266091&view=rev Log: Revert 266090, needs more testing first. Modified: cfe/trunk/include/clang/Driver/Options.td cfe/trunk/test/Driver/cl-options.c Modified: cfe/trunk/include/c

Re: r265994 - libclang: fix two memory leaks (PR26292)

2016-04-12 Thread David Blaikie via cfe-commits
Any chance of using unique_ptr, or at least a scoped cleanup device, here? On Mon, Apr 11, 2016 at 1:54 PM, Hans Wennborg via cfe-commits < cfe-commits@lists.llvm.org> wrote: > Author: hans > Date: Mon Apr 11 15:53:59 2016 > New Revision: 265994 > > URL: http://llvm.org/viewvc/llvm-project?rev=26

  1   2   >