Re: [PATCH] D52533: [test] Use --sysroot instead of -B in print-multi-directory.c

2018-10-03 Thread Christian BRUEL via cfe-commits
Hi Martin, Actually I reread the developer policy, (https://llvm.org/docs/DeveloperPolicy.html#id13). As I contributed this code and take responsibility for it. It seems that I can approve this patch. So it looks OK for me, sorry for the delay, Cheers Christian On 10/02/2018 07:55 PM, Martin

[PATCH] D46535: Correct warning on Float->Integer conversions.

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Hello, @erichkeane I am working on int to float checker but I haven't found yet a way how to check if integer fits to float's significant bits. Maybe you can recommend me something? I already tried some LLVM APIs but no success. (cc @spatel as you will probably know t

[PATCH] D52819: Support checking out cte to 'extra' only as backward compatibility

2018-10-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire created this revision. steveire added a reviewer: aaron.ballman. Herald added subscribers: cfe-commits, mgorny. This requirement to check it out in a directory called 'extra' was never documented for git users, so git users doing the obvious thing (just clone, don't specify a name) will s

[clang-tools-extra] r343664 - [clang-query] Add single-letter 'q' alias for 'quit'

2018-10-03 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Oct 3 00:52:44 2018 New Revision: 343664 URL: http://llvm.org/viewvc/llvm-project?rev=343664&view=rev Log: [clang-query] Add single-letter 'q' alias for 'quit' Reviewers: aaron.ballman, pcc Reviewed By: aaron.ballman Subscribers: Szelethus, cfe-commits Differential

[PATCH] D52746: [clang-query] Add single-letter 'q' alias for 'quit'

2018-10-03 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343664: [clang-query] Add single-letter 'q' alias for 'quit' (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D52746?vs=167984&id=168077#toc Repository: rCTE

r343665 - Allow comments with '#' in dynamic AST Matchers

2018-10-03 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Oct 3 00:56:43 2018 New Revision: 343665 URL: http://llvm.org/viewvc/llvm-project?rev=343665&view=rev Log: Allow comments with '#' in dynamic AST Matchers Summary: This is necessary for clang-query to be able to handle comments. Reviewers: aaron.ballman Reviewed By:

[PATCH] D52751: Allow comments with '#' in dynamic AST Matchers

2018-10-03 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343665: Allow comments with '#' in dynamic AST Matchers (authored by steveire, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52751?vs=167987

[clang-tools-extra] r343666 - [clang-query] Add comment token handling

2018-10-03 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Oct 3 01:21:54 2018 New Revision: 343666 URL: http://llvm.org/viewvc/llvm-project?rev=343666&view=rev Log: [clang-query] Add comment token handling Summary: It is possible to pass a file of commands to clang-query using the command line option -f or --preload. Make it

[PATCH] D52806: [python] Support overriding library path via environment

2018-10-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny updated this revision to Diff 168079. mgorny added a comment. To avoid consumers of the bindings, I've changed the patch to set the path only through tests. As a result, the binding API is unchanged. https://reviews.llvm.org/D52806 Files: bindings/python/README.txt bindings/python/t

[PATCH] D52752: [clang-query] Add comment token handling

2018-10-03 Thread Stephen Kelly via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE343666: [clang-query] Add comment token handling (authored by steveire, committed by ). Changed prior to commit: https://reviews.llvm.org/D52752?vs=167848&id=168080#toc Repository: rCTE Clang Tools

[PATCH] D52742: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag

2018-10-03 Thread Whisperity via Phabricator via cfe-commits
whisperity added inline comments. Comment at: test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist:6 + clang_version +clang version 8.0.0 (http://mainstream.inf.elte.hu/Szelethus/clang 85a6dda64587a5a18482f091cbcf020fbd3ec1dd) (https://github.com/llvm-mirr

[PATCH] D52752: [clang-query] Add comment token handling

2018-10-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire marked an inline comment as done. steveire added inline comments. Comment at: clang-query/QueryParser.cpp:42 +End = Begin; +return StringRef(Begin, 0); + } aaron.ballman wrote: > This is just returning an empty `StringRef`, isn't it? Might as we

[PATCH] D52798: [cl-compat] Change /JMC from unsupported to ignored.

2018-10-03 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. Thanks for fixing! Please also update the test in test/Driver/cl-options.c and include me on clang-cl code reviews. Repository: rL LLVM https://reviews.llvm.org/D52798 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D52771: [private][clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 168088. lebedev.ri added a subscriber: cfe-commits. lebedev.ri added a comment. Finds classes that not only contain the data (non-static member variables), but also have logic (non-static member functions), and diagnoses all member variables that have any o

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added inline comments. Comment at: clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp:26 + +AST_MATCHER(clang::CXXRecordDecl, hasNonStaticMethod) { + return hasMethod(unless(isStaticStorageClass())) I think this and the next matcher can be a n

[PATCH] D51949: [clang-tidy] new check 'readability-isolate-declaration'

2018-10-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 168091. JonasToth marked 2 inline comments as done. JonasToth added a comment. - remove spurious local variable Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D51949 Files: clang-tidy/readability/CMakeLists.txt clang-tidy/readability/I

[PATCH] D52688: [clang-tidy] NFC use CHECK-NOTES in tests for fuchsia-default-arguments

2018-10-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 168092. JonasToth added a comment. - remove FIX-IT as these will be filtered with the other patch Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52688 Files: test/clang-tidy/fuchsia-default-arguments.cpp Index: test/clang-tidy/fuchsia

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 168094. JonasToth added a comment. - Merge branch 'master' into check_macros_usage Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoreguidelines/CppCoreGuidelinesT

[clang-tools-extra] r343673 - [clang-tidy] NFC reorder registering in CppCoreGuidelines module

2018-10-03 Thread Jonas Toth via cfe-commits
Author: jonastoth Date: Wed Oct 3 03:37:19 2018 New Revision: 343673 URL: http://llvm.org/viewvc/llvm-project?rev=343673&view=rev Log: [clang-tidy] NFC reorder registering in CppCoreGuidelines module Modified: clang-tools-extra/trunk/clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth added a comment. @aaron.ballman What do you think of the current version of this check? As migration strategy the option for `CAPS_ONLY` is provided, otherwise the filtering is provided to silence necessary macros (which kind of enforces a common prefix for macros). This does implement

[PATCH] D41648: [clang-tidy] implement cppcoreguidelines macro rules

2018-10-03 Thread Jonas Toth via Phabricator via cfe-commits
JonasToth updated this revision to Diff 168095. JonasToth added a comment. - add more positive tests - Merge branch 'master' into check_macros_usage Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41648 Files: clang-tidy/cppcoreguidelines/CMakeLists.txt clang-tidy/cppcoregui

[PATCH] D52117: Generate llvm.loop.parallel_accesses instead of llvm.mem.parallel_loop_access metadata.

2018-10-03 Thread Michael Kruse via Phabricator via cfe-commits
Meinersbur updated this revision to Diff 168096. Meinersbur added a comment. - Upload diff for clang portion (instead of https://reviews.llvm.org/D52116) Repository: rC Clang https://reviews.llvm.org/D52117 Files: lib/CodeGen/CGLoopInfo.cpp lib/CodeGen/CGLoopInfo.h test/CodeGenCXX/prag

[PATCH] D52742: [analyzer][PlistMacroExpansion] Part 1.: New expand-macros flag

2018-10-03 Thread Umann Kristóf via Phabricator via cfe-commits
Szelethus marked 3 inline comments as done. Szelethus added inline comments. Comment at: test/Analysis/Inputs/expected-plists/plist-macros-with-expansion.cpp.plist:6 + clang_version +clang version 8.0.0 (http://mainstream.inf.elte.hu/Szelethus/clang 85a6dda64587a5a18482f091cbcf

[PATCH] D52819: Support checking out cte to 'extra' only as backward compatibility

2018-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Given the scope of what this changes (such as 3rd party configurations), I think that this requires a broader community discussion than what you'll get from this patch. I would suggest starting an [RFC] thread on cfe-commits and cfe-dev to see what people think of

[PATCH] D49864: [clang-tidy] The script clang-tidy-diff.py doesn't accept 'pass by' options (--)

2018-10-03 Thread Jano Simas via Phabricator via cfe-commits
janosimas added a comment. I like a lot of this syntax you proposed, makes a lot more sense to me. The script will be shorter and the doc will be "auto updated" with the clang-tidy doc. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49864 ___

r343681 - Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr

2018-10-03 Thread Aaron Puchert via cfe-commits
Author: aaronpuchert Date: Wed Oct 3 04:58:19 2018 New Revision: 343681 URL: http://llvm.org/viewvc/llvm-project?rev=343681&view=rev Log: Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr Summary: When people are really sure they'll get the lock they sometimes use __builtin_e

[PATCH] D52398: Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr

2018-10-03 Thread Aaron Puchert via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343681: Thread safety analysis: Unwrap __builtin_expect in getTrylockCallExpr (authored by aaronpuchert, committed by ). Herald added a subscriber: llvm-commits. Repository: rL LLVM https://reviews.llv

[PATCH] D46535: Correct warning on Float->Integer conversions.

2018-10-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. In https://reviews.llvm.org/D46535#1253473, @xbolva00 wrote: > Hello, @erichkeane > > I am working on int to float checker but I haven't found yet a way how to > check if integer fits to float's significant bits. Maybe you can recommend me > something? I already trie

[PATCH] D46535: Correct warning on Float->Integer conversions.

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Yeah, I want to check if it fits into mantissa. Repository: rC Clang https://reviews.llvm.org/D46535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52058: Add Parameters to DW_AT_name Attribute of Template Variables

2018-10-03 Thread Jonas Devlieghere via Phabricator via cfe-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM Repository: rC Clang https://reviews.llvm.org/D52058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llv

[PATCH] D52800: Java import sorting in clang-format

2018-10-03 Thread Sam Maier via Phabricator via cfe-commits
SamMaier updated this revision to Diff 168111. SamMaier set the repository for this revision to rC Clang. SamMaier added a comment. Changed std::sort to llvm::sort Repository: rC Clang https://reviews.llvm.org/D52800 Files: include/clang/Format/Format.h lib/Format/Format.cpp unittests/

[PATCH] D52819: Support checking out cte to 'extra' only as backward compatibility

2018-10-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire added a comment. Will do! Repository: rC Clang https://reviews.llvm.org/D52819 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-10-03 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov updated this revision to Diff 168115. AlexeySachkov added a comment. Herald added a subscriber: arphaman. Applied comments from Anastasia. Updated headers to conform with the latest spec https://reviews.llvm.org/D51484 Files: include/clang-c/Index.h include/clang/AST/ASTContex

[PATCH] D51464: clang: fix MIPS/N32 triple and paths

2018-10-03 Thread YunQiang Su via Phabricator via cfe-commits
wzssyqa updated this revision to Diff 168116. https://reviews.llvm.org/D51464 Files: lib/Basic/Targets/Mips.h lib/Driver/ToolChains/Arch/Mips.cpp lib/Driver/ToolChains/Gnu.cpp lib/Driver/ToolChains/Linux.cpp test/CodeGen/atomics-inlining.c test/CodeGen/mips-zero-sized-struct.c test/

[PATCH] D51484: [OpenCL] Add support of cl_intel_device_side_avc_motion_estimation extension

2018-10-03 Thread Alexey Sachkov via Phabricator via cfe-commits
AlexeySachkov marked 7 inline comments as done. AlexeySachkov added inline comments. Comment at: test/SemaOpenCL/intel-subgroup-avc-ext-types.cl:13 + +#define CLK_AVC_IME_PAYLOAD_INITIALIZE_INTEL { 0 } +#define CLK_AVC_REF_PAYLOAD_INITIALIZE_INTEL { 0 } Anast

[PATCH] D51464: clang: fix MIPS/N32 triple and paths

2018-10-03 Thread YunQiang Su via Phabricator via cfe-commits
wzssyqa added a comment. ohhh. make check-all is needed, instead of make check > test/CodeGen/target-data.c is due to duplicate line `MIPS-64EL: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"' > test/Driver/mips-cs.cpp is due to this test use the hardcode path `/mips-lin

[PATCH] D37813: clang-format: better handle namespace macros

2018-10-03 Thread Francois Ferrand via Phabricator via cfe-commits
Typz added a comment. In https://reviews.llvm.org/D37813#1184051, @klimek wrote: > The problem here is that we have different opinions on how the formatting on > namespace macros should behave in the first place- I think they should behave > like namespaces, you want them to be formatted differ

[PATCH] D52800: Java import sorting in clang-format

2018-10-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added inline comments. Comment at: lib/Format/Format.cpp:848 ChromiumStyle.IndentWidth = 4; +ChromiumStyle.JavaImportGroups = { +"android", It would be helpful to link to a style guide reference for this. Comment at: l

[PATCH] D52058: Add Parameters to DW_AT_name Attribute of Template Variables

2018-10-03 Thread Matthew Voss via Phabricator via cfe-commits
ormris added a comment. Thanks! I'll go ahead and commit this. Repository: rC Clang https://reviews.llvm.org/D52058 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

r343699 - [COFF, ARM64] Add _ReadWriteBarrier intrinsic

2018-10-03 Thread Mandeep Singh Grang via cfe-commits
Author: mgrang Date: Wed Oct 3 10:24:21 2018 New Revision: 343699 URL: http://llvm.org/viewvc/llvm-project?rev=343699&view=rev Log: [COFF, ARM64] Add _ReadWriteBarrier intrinsic Reviewers: rnk, mstorsjo, compnerd, TomTan, haripul, javed.absar Reviewed By: rnk Subscribers: kristof.beyls, chrib,

[PATCH] D52809: [COFF, ARM64] Add _ReadWriteBarrier intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343699: [COFF, ARM64] Add _ReadWriteBarrier intrinsic (authored by mgrang, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52809?vs=168048&id=

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-10-03 Thread Zinovy Nis via Phabricator via cfe-commits
zinovy.nis added a comment. In https://reviews.llvm.org/D45776#1251256, @lebedev.ri wrote: > Did this intentionally omit the possibility to pass a group of prefixes, like > `FileCheck` supports? > Usefulness of this feature is somewhat penalized by this. I did not fully realize what do you me

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45776#1253934, @zinovy.nis wrote: > In https://reviews.llvm.org/D45776#1251256, @lebedev.ri wrote: > > > Did this intentionally omit the possibility to pass a group of prefixes, > > like `FileCheck` supports? > > Usefulness of this featur

[PATCH] D45776: [clang-tidy] Customize FileCheck prefix in check_clang-tidy.py

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45776#1253934, @zinovy.nis wrote: > In https://reviews.llvm.org/D45776#1251256, @lebedev.ri wrote: > > > Did this intentionally omit the possibility to pass a group of prefixes, > > like `FileCheck` supports? > > Usefulness of this featur

[PATCH] D52658: [OpenCL] Remove PIPE_RESERVE_ID_VALID_BIT from opencl-c.h

2018-10-03 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. I am OK with the change. Repository: rC Clang https://reviews.llvm.org/D52658 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 created this revision. xbolva00 added a reviewer: rsmith. Herald added a subscriber: cfe-commits. xbolva00 updated this revision to Diff 168137. https://reviews.llvm.org/D52835 Files: lib/Sema/SemaChecking.cpp test/Sema/ext_vector_casts.c Index: test/Sema/ext_vector_casts.c ===

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 168137. https://reviews.llvm.org/D52835 Files: lib/Sema/SemaChecking.cpp test/Sema/ext_vector_casts.c Index: test/Sema/ext_vector_casts.c === --- test/Sema/ext_vector_casts.c +++ test/Sema

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:3003 + case Builtin::BI_InterlockedCompareExchangePointer: + case Builtin::BI_InterlockedCompareExchangePointer_nf: { llvm::Type *RTy; rnk wrote: > Is the no fence version really equivalen

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 168140. xbolva00 added a comment. - Added tests https://reviews.llvm.org/D52835 Files: lib/Sema/SemaChecking.cpp test/Sema/ext_vector_casts.c test/Sema/impcast-integer-float.c Index: test/Sema/impcast-integer-float.c ===

[PATCH] D52791: [Diagnostics] Check for misleading pointer declarations

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added a comment. Any futher comments? https://reviews.llvm.org/D52791 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/Sema/ext_vector_casts.c:121 vf = d + vf; // expected-warning {{implicit conversion loses floating-point precision}} - vf = vf + 0x; + vf = vf + 0x; // expected-warning {{implicit conversion loses floating-p

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: test/Sema/ext_vector_casts.c:121 vf = d + vf; // expected-warning {{implicit conversion loses floating-point precision}} - vf = vf + 0x; + vf = vf + 0x; // expected-warning {{implicit conversion loses floating-poi

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 168141. https://reviews.llvm.org/D52835 Files: lib/Sema/SemaChecking.cpp test/Sema/ext_vector_casts.c test/Sema/impcast-integer-float.c Index: test/Sema/impcast-integer-float.c === --- t

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang created this revision. mgrang added reviewers: rnk, mstorsjo, compnerd, TomTan, haripul. Herald added a reviewer: javed.absar. Herald added subscribers: chrib, kristof.beyls. Repository: rC Clang https://reviews.llvm.org/D52838 Files: include/clang/Basic/BuiltinsAArch64.def lib/Code

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: test/Sema/ext_vector_casts.c:121 vf = d + vf; // expected-warning {{implicit conversion loses floating-point precision}} - vf = vf + 0x; + vf = vf + 0x; // expected-warning {{implicit conversion loses floating-p

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-03 Thread Mandeep Singh Grang via Phabricator via cfe-commits
mgrang added a comment. I have some questions about the behavior of getReg: __getReg ultimately invokes AArch64TargetLowering::getRegisterByName in llvm/lib/Target/AArch64/AArch64ISelLowering.cpp. You can __getReg only those registers which appear in the switch-case inside that function. Even t

r343702 - [test] Use --sysroot instead of -B in print-multi-directory.c

2018-10-03 Thread Martin Storsjo via cfe-commits
Author: mstorsjo Date: Wed Oct 3 11:24:05 2018 New Revision: 343702 URL: http://llvm.org/viewvc/llvm-project?rev=343702&view=rev Log: [test] Use --sysroot instead of -B in print-multi-directory.c This avoids finding a similar matching GCC installation outside of the test directory tree in the su

[PATCH] D52533: [test] Use --sysroot instead of -B in print-multi-directory.c

2018-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit rC343702: [test] Use --sysroot instead of -B in print-multi-directory.c (authored by mstorsjo, committed by ). Changed prio

[clang-tools-extra] r343703 - [clang-doc] Avoid parsing undefined base classes

2018-10-03 Thread Julie Hockett via cfe-commits
Author: juliehockett Date: Wed Oct 3 11:25:27 2018 New Revision: 343703 URL: http://llvm.org/viewvc/llvm-project?rev=343703&view=rev Log: [clang-doc] Avoid parsing undefined base classes Don't try to parse base classes for declarations that are not definitions (segfaults, as there is no Definiti

[PATCH] D52313: [clang-doc] Avoid parsing undefined base classes

2018-10-03 Thread Julie Hockett via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL343703: [clang-doc] Avoid parsing undefined base classes (authored by juliehockett, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D52313?vs=1

[PATCH] D52670: [clang-tidy] Add new 'readability-uppercase-literal-suffix' check (CERT DCL16-C, MISRA C:2012, 7.3, MISRA C++:2008, 2-13-4)

2018-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. Two main points: I don't think this check is covering all of the suffixes (I don't see `q` or `i32` support, for instance), and at least for the CERT rule this is covering, it diagnoses more than it should. The CERT rule is specific to `l` vs `L` but imposes no re

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-03 Thread Kevin P. Neal via Phabricator via cfe-commits
kpn created this revision. kpn added a reviewer: rsmith. Herald added a reviewer: javed.absar. Herald added a subscriber: cfe-commits. The UnaryOperator needs to know about #pragma FENV_ACCESS to eventually properly emit the constrained math intrinsics. This diff just gets the information about

[PATCH] D52840: Include Python binding tests in CMake rules

2018-10-03 Thread Michał Górny via Phabricator via cfe-commits
mgorny created this revision. mgorny added reviewers: jbcoe, arphaman, frutiger. Add a new CMake rule check-clang-python to run the Python bindings' test suite, and include it in check-all. Repository: rC Clang https://reviews.llvm.org/D52840 Files: CMakeLists.txt bindings/python/tests/C

r343707 - Add template type and value parameter metadata nodes to template variable specializations

2018-10-03 Thread Matthew Voss via cfe-commits
Author: ormris Date: Wed Oct 3 11:45:04 2018 New Revision: 343707 URL: http://llvm.org/viewvc/llvm-project?rev=343707&view=rev Log: Add template type and value parameter metadata nodes to template variable specializations Summary: Add an optional attribute referring to a tuple of type and value

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 updated this revision to Diff 168150. xbolva00 added a comment. - better warning https://reviews.llvm.org/D52835 Files: lib/Sema/SemaChecking.cpp test/Sema/ext_vector_casts.c test/Sema/impcast-integer-float.c Index: test/Sema/impcast-integer-float.c =

[PATCH] D52058: Add template type and value parameter metadata nodes to template variable specializations

2018-10-03 Thread Matthew Voss via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343707: Add template type and value parameter metadata nodes to template variable… (authored by ormris, committed by ). Changed prior to commit: https://reviews.llvm.org/D52058?vs=167849&id=168152#toc

[PATCH] D52281: [clang-tidy] Add modernize check to use std::invoke in generic code

2018-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/modernize/ReplaceGenericFunctorCallCheck.cpp:32 + // ::std::invoke(func, 1) + Finder->addMatcher(callExpr(has(declRefExpr())).bind("functor"), this); + I don't think this will work for calls wrapped

[PATCH] D52807: [COFF, ARM64] Add _InterlockedCompareExchangePointer_nf intrinsic

2018-10-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added inline comments. Comment at: lib/CodeGen/CGBuiltin.cpp:3003 + case Builtin::BI_InterlockedCompareExchangePointer: + case Builtin::BI_InterlockedCompareExchangePointer_nf: { llvm::Type *RTy; mgrang wrote: > rnk wrote: > > Is the no fence vers

[PATCH] D52839: Inform AST's UnaryOperator of FENV_ACCESS

2018-10-03 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. Maybe take this very slightly further so it becomes testable: change the expression evaluator (lib/AST/ExprConstant.cpp) so it treats floating-point operations as non-constant if they're potentially-overflowing. You also need to update lib/Serialization/AST{Reader,Writer

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: lib/Sema/SemaChecking.cpp:110 +/// are usually useless +static unsigned AdjustPrecision(unsigned precision) { + return (precision * 59 + 195) / 196; Hmm I don't terribly understand how this function works. Also,

[PATCH] D46535: Correct warning on Float->Integer conversions.

2018-10-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > Every Integer is representable (lossy of course) as a float as far as I know. Casting a __uint128_t to float can overflow. And overflowing a _Float16 is easy. (Of course, both __uint128_t and _Float16 are rare in normal C/C++ code.) Repository: rC Clang https:/

[PATCH] D52695: [clang][Parse] Diagnose useless null statements (PR39111)

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 168157. lebedev.ri marked 4 inline comments as done. lebedev.ri added a comment. After looking at stage-2 of LLVM, remove `-Wextra-semi-stmt` from `-Wextra`, and add `-Wempty-init-stmt` back into `-Wextra`. Anything else? Repository: rC Clang https://

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Steve Canon via Phabricator via cfe-commits
scanon added inline comments. Comment at: lib/Sema/SemaChecking.cpp:110 +/// are usually useless +static unsigned AdjustPrecision(unsigned precision) { + return (precision * 59 + 195) / 196; erichkeane wrote: > Hmm I don't terribly understand how this functi

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-03 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: djasper. The existing code kept the space if it was there for identifiers, and it didn't handle `this`. After this patch, for java `this` is handled in addition to identifiers, and existing space is always stripped between identifier and `::

[PATCH] D52782: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)

2018-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/utils/ExprSequence.cpp:103 for (const Stmt *Parent : getParentStmts(S, Context)) { +// For statements that have multiple parents, make sure we're using the +// parent that lies within the sub-tree under Root.

[PATCH] D52782: [clang-tidy] Sequence statements with multiple parents correctly (PR39149)

2018-10-03 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. This seems reasonable to me. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52782 ___ cfe-commits mailing list cfe

[PATCH] D52727: [clang-tidy] White List Option for performance-unnecessary-value-param, performance-unnecessary-copy-initialization and performance-for-range-copy

2018-10-03 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/performance/ForRangeCopyCheck.h:43 const bool WarnOnAllAutoCopies; + const std::vector WhiteListTypes; }; Nit: can you name it `AllowedTypes` rather than `WhiteListTypes`? Use similar nomenclature

[PATCH] D52843: Update Clang Windows getting started docs

2018-10-03 Thread Reid Kleckner via Phabricator via cfe-commits
rnk created this revision. rnk added reviewers: zturner, STL_MSFT. Herald added a subscriber: jfb. rnk added a subscriber: aaron.ballman. - Update the example VS project generation to use VS2017. - Add docs for generating ninja build files, since they are popular. - Remove reference to "make updat

[PATCH] D52842: clang-format: Don't insert spaces in front of :: for Java 8 Method References.

2018-10-03 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 168161. thakis edited the summary of this revision. https://reviews.llvm.org/D52842 Files: lib/Format/TokenAnnotator.cpp unittests/Format/FormatTestJava.cpp Index: lib/Format/TokenAnnotator.cpp

r343711 - [OPENMP] Add reverse_offload clause to requires directive

2018-10-03 Thread Patrick Lyster via cfe-commits
Author: plyster Date: Wed Oct 3 13:07:58 2018 New Revision: 343711 URL: http://llvm.org/viewvc/llvm-project?rev=343711&view=rev Log: [OPENMP] Add reverse_offload clause to requires directive Modified: cfe/trunk/include/clang/AST/OpenMPClause.h cfe/trunk/include/clang/AST/RecursiveASTVisi

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. None of this seems to be ARM64 specific - if I read it correctly, this adds the _InterlockedAdd intrinsic for ARM and X64 as well. How come this hasn't been an issue for those targets up until now? Do those targets have any other code somewhere handling it, that might

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-03 Thread Eli Friedman via Phabricator via cfe-commits
efriedma added a comment. > How come this hasn't been an issue for those targets up until now? MSVC doesn't define _InterlockedAdd for x64. Repository: rC Clang https://reviews.llvm.org/D52811 ___ cfe-commits mailing list cfe-commits@lists.llvm.

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 168162. lebedev.ri marked 5 inline comments as done. lebedev.ri added a comment. Address review notes - more tests. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52771 Files: clang-tidy/cppcoreguidelines/CppCoreGuidelinesTidyModule.cp

[PATCH] D52771: [clang-tidy] Non-private member variables in classes (MISRA, CppCoreGuidelines, HICPP)

2018-10-03 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: clang-tidy/misc/NonPrivateMemberVariablesInClassesCheck.cpp:26 + +AST_MATCHER(clang::CXXRecordDecl, hasNonStaticMethod) { + return hasMethod(unless(isStaticStorageClass())) JonasToth wrote: > I think this and the nex

[PATCH] D52838: [COFF, ARM64] Add __getReg intrinsic

2018-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added subscribers: efriedma, peter.smith. mstorsjo added a comment. In https://reviews.llvm.org/D52838#1253998, @mgrang wrote: > I have some questions about the behavior of getReg: > > __getReg ultimately invokes getRegisterByName in > http://llvm.org/doxygen/AArch64ISelLowering_8cpp_so

[PATCH] D52811: [COFF, ARM64] Add _InterlockedAdd intrinsic

2018-10-03 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In https://reviews.llvm.org/D52811#1254162, @efriedma wrote: > > How come this hasn't been an issue for those targets up until now? > > MSVC doesn't define _InterlockedAdd for x64. Ok - but judging from the context here, this would make clang define it there - which p

[PATCH] D52791: [Diagnostics] Check for misleading pointer declarations

2018-10-03 Thread Nicolas Lesser via Phabricator via cfe-commits
Rakete added a comment. There's a false positive. int **A, *B; // false positive: declaring a variable of type 'int *'; did you mean to declare a pointer? And IMO this should also warn: int **A, B; // no warning currently https://reviews.llvm.org/D52791 ___

[PATCH] D52800: Java import sorting in clang-format

2018-10-03 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Another example: we have to be careful with something like this as we don't want to break correct code: import x; import a.loong. c; import y; Comment at: unittests/Format/SortImportsTestJava.cpp:130 + "// that do\n" +

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10862 + if (Source->isIntegerType() && Target->isFloatingType()) { +const llvm::fltSemantics *FloatSem = nullptr; +if (Target->isSpecificBuiltinType(BuiltinType::Float)) { erichkeane w

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Dávid Bolvanský via Phabricator via cfe-commits
xbolva00 added inline comments. Comment at: lib/Sema/SemaChecking.cpp:10883 + precision = AdjustPrecision(precision); + FloatValue.toString(PrettyTargetValue, precision); + IntValue.toString(PrettySourceValue); erichkeane wrote: > I won

r343715 - [analyzer] [tests] [quickfix] Make the test more resilient for a non-defaut std configuration

2018-10-03 Thread George Karpenkov via cfe-commits
Author: george.karpenkov Date: Wed Oct 3 13:46:50 2018 New Revision: 343715 URL: http://llvm.org/viewvc/llvm-project?rev=343715&view=rev Log: [analyzer] [tests] [quickfix] Make the test more resilient for a non-defaut std configuration Modified: cfe/trunk/test/Analysis/html_diagnostics/rele

r343716 - Sort list of matchers

2018-10-03 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Oct 3 13:52:45 2018 New Revision: 343716 URL: http://llvm.org/viewvc/llvm-project?rev=343716&view=rev Log: Sort list of matchers Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp URL: http://llvm.org

r343717 - Add matchers missing from dynamic AST registry

2018-10-03 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Oct 3 13:52:51 2018 New Revision: 343717 URL: http://llvm.org/viewvc/llvm-project?rev=343717&view=rev Log: Add matchers missing from dynamic AST registry Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.cpp Modified: cfe/trunk/lib/ASTMatchers/Dynamic/Registry.

r343720 - Remove stray character from docs

2018-10-03 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Oct 3 13:53:02 2018 New Revision: 343720 URL: http://llvm.org/viewvc/llvm-project?rev=343720&view=rev Log: Remove stray character from docs Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h URL:

r343719 - Update documentation for correctness

2018-10-03 Thread Stephen Kelly via cfe-commits
Author: steveire Date: Wed Oct 3 13:52:57 2018 New Revision: 343719 URL: http://llvm.org/viewvc/llvm-project?rev=343719&view=rev Log: Update documentation for correctness Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h Modified: cfe/trunk/include/clang/ASTMatchers/ASTMatchers.h

r343721 - [test] Fix -Wunused-variable in rC343665

2018-10-03 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Oct 3 13:53:53 2018 New Revision: 343721 URL: http://llvm.org/viewvc/llvm-project?rev=343721&view=rev Log: [test] Fix -Wunused-variable in rC343665 Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/ParserTest.cpp Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/Pa

[PATCH] D52835: [Diagnostics] Check integer to floating point number implicit conversions

2018-10-03 Thread Craig Topper via Phabricator via cfe-commits
craig.topper added inline comments. Comment at: lib/Sema/SemaChecking.cpp:110 +/// are usually useless +static unsigned AdjustPrecision(unsigned precision) { + return (precision * 59 + 195) / 196; scanon wrote: > erichkeane wrote: > > Hmm I don't terribly un

[PATCH] D47344: LWG 2843 "Unclear behavior of std::pmr::memory_resource::do_allocate()"

2018-10-03 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone updated this revision to Diff 168169. Quuxplusone edited the summary of this revision. Quuxplusone added a reviewer: ldionne. Quuxplusone added a comment. Herald added a subscriber: libcxx-commits. Rebased on master. Added @ldionne as reviewer. Repository: rCXX libc++ https://revi

r343722 - [ASTMatchers] Fix DynamicASTMatchersTests again

2018-10-03 Thread Fangrui Song via cfe-commits
Author: maskray Date: Wed Oct 3 14:00:44 2018 New Revision: 343722 URL: http://llvm.org/viewvc/llvm-project?rev=343722&view=rev Log: [ASTMatchers] Fix DynamicASTMatchersTests again Modified: cfe/trunk/unittests/ASTMatchers/Dynamic/ParserTest.cpp Modified: cfe/trunk/unittests/ASTMatchers/Dyn

[PATCH] D52840: Include Python binding tests in CMake rules

2018-10-03 Thread Stephen Kelly via Phabricator via cfe-commits
steveire accepted this revision. steveire added a comment. This revision is now accepted and ready to land. I didn't run it, but CMake-wise this looks fine. (I trust you did) I notice some tests use from tests.cindex.util import foo while others use from .util import foo You might want to

  1   2   >